Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70ED618FBE for ; Wed, 2 Mar 2016 22:02:25 +0000 (UTC) Received: (qmail 37974 invoked by uid 500); 2 Mar 2016 22:02:24 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 37939 invoked by uid 500); 2 Mar 2016 22:02:24 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 37927 invoked by uid 99); 2 Mar 2016 22:02:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 22:02:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A7F861A0706 for ; Wed, 2 Mar 2016 22:02:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 2ntp4zObB2YC for ; Wed, 2 Mar 2016 22:02:20 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id ABB3B5FBDB for ; Wed, 2 Mar 2016 22:02:19 +0000 (UTC) Received: by mail-vk0-f54.google.com with SMTP id c3so2910284vkb.3 for ; Wed, 02 Mar 2016 14:02:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=6Ff/cy8ZgHkWyjuVnvFPX+EtJCp+0N9yaptFRuw7NhQ=; b=vU+8+5WIfwMRVdT91dxmh+If2WS5fpuJ1UARF7o6fSjZlBcxYzsQL1Gx4ZZK6bt3+u 5ZsgMcJ92DziEg/MdgKJlRCfF9Rqv0dDqHTlyavFnji3w0iXujRHz6Os6iIYn+kY7ZRX itcuMsNHixgxBRO4eG/UX+uFzVSytfJigo/uJqihLFhSMlCYeVumpxpelSPepNz864yj saQZft1POlGkQ7vtiuix3vlhxmOR4aeTR7Zt4nBIOHQH0oyVS1QV88xUc2n3eZZTSIdu j4EIRYPrKYtpW8dUbOWjPATlN9X8elHxvSMcKtWJIDBiYPXFbwCUG1dX54pca5L3pEAs 9iLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=6Ff/cy8ZgHkWyjuVnvFPX+EtJCp+0N9yaptFRuw7NhQ=; b=f1eXb60zX81CfQU161fcSS3lD1Si6cHD0HWrq6m1IMkMzJRu2DMJUYqk76C5uA291k 5eAtcOrWOKlb9qyZmrhK2kO/V6EmYz1fWDQvp1Zj/CxfMbbSmddRaGx5DI6vGQ+OMsvM i+dJ/Fwit6MOsrQAXpIc8ozkFh8uj4Iben03R4+dUvOg1SLZ2CvGb2ClwwBaR0TmPCRg hMMdQrncvnKK/WC4/2feMnTDjBnTtX2b4xj07P1JvEcixIy2qHOt2c74XN6MckCqG+S+ uAmnEZ4CDbHKWE36J8y4amL8FYrudFbGup+RBie6OMJNjbwaNe9o+FX+Vw/KEXnhmsoh iPHg== X-Gm-Message-State: AD7BkJIuCUC8242lZOchirAjB0+wEKkKAEUFiuUXMF3mEBf05Zs/CQ7a9v0TXP9dNxtFW44v1k818QuzmY4CsQ== X-Received: by 10.31.132.140 with SMTP id g134mr22236713vkd.94.1456956138956; Wed, 02 Mar 2016 14:02:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Carlos Santana Date: Wed, 02 Mar 2016 22:02:09 +0000 Message-ID: Subject: Re: [Android] CB-8976, CB-8453 and is there anyone building multiple APKs To: dev Content-Type: multipart/alternative; boundary=001a1145886e1db918052d180937 --001a1145886e1db918052d180937 Content-Type: text/plain; charset=UTF-8 Avoiding a large APK is kind of a good feature to have, to build small apk targeted to specific architecture. What's your proposal ? Maybe I missed it You said to remove multiple apk generation or have multiple apk generation being don in a different way to handle the versionCode per architecture? On Wed, Mar 2, 2016 at 4:41 PM Joe Bowser wrote: > On Wed, Mar 2, 2016 at 1:26 PM, Carlos Santana > wrote: > > > If it's not well documented how this multiple APKs suppose to work and > use. > > then I would say the impact is low > > > > I disagree, since people using Crosswalk are expecting that behaviour by > default right now. We don't have to built multiple APKs with Crosswalk > but bundling both the X86 and the ARM libraries makes the APK 48 MB. > > > > If it's not part of the build.json in --buildConfig spec [1] then also > low > > impact. > > > > > I would agree if build.json was universally adopted as the way to do > things, and there wasn't multiple ways people were building production > apps. Right now, it's more likely that someone would store a > settings.gradle file pointing to the keystore instead, especially since it > doesn't prompt for a password like build.json does. > > > > > It would be good to get some of those answers to the questions you have > > about apk requiring different version code on store > > > > > I just tried to deploy multiple APKs with different architectures on the > play store, you can't do it. If you try, you replace your ARM apk with an > x86 APK. You have to have a different version code for each of them. > > > > > Maybe it make sense to remove it from builde.gradle and move it to > > build.json if it's something that is something that comes into play when > > releasing instead of being normal dev cycle. > > > > [1]: > > > > > https://cordova.apache.org/docs/en/dev/guide/platforms/android/#signing-an-app > > > > > > On Wed, Mar 2, 2016 at 4:12 PM Joe Bowser wrote: > > > > > On Wed, Mar 2, 2016 at 1:07 PM, Carlos Santana > > > wrote: > > > > > > > First sorry for my stupid questions :-) > > > > > > > > Why do we need to mess with this versionCode? > > > > > > > > > > > Short Answer: We shouldn't have to. > > > > > > Long Answer: We might need it for Crosswalk only. > > > > > > > > > > > > > How a native developer creating a new Android App today using Android > > > > Studio and gradle handle this? > > > > > > > > > > They set it in the Android Manifest like they're supposed to. This > > hasn't > > > changed AFAIK. Apparently having multiple APKs in the store means that > > you > > > have to have different version codes, although I haven't tested this > yet. > > > > > > > > > > Should that help us determined how it should work for Cordova Apps? > > > > > > > > > > You'd think, but then we wouldn't have this weird system in place right > > > now. I wish we talked about this more, but this seems to have mostly > > flown > > > in under the radar when we were getting Cordova 4.0 out. > > > > > > > > > > > > > > Can we come with a similar system, or no system, or it's user space > > where > > > > they can put a version code they want to use in config.xml in > > conjunction > > > > with of the version string (i.e. 1.0.0) that they are already using > in. > > > > > > > > > > > > > > > I believe that config.xml already does this, but we then munge it all > up > > > because someone thought that we might want to have many APKs instead of > > > just one APK for a version of Android. This is something that's pissed > > off > > > various developers over the past year, and the reason I'm asking is > > because > > > I want to see it deleted, but don't want to break anyone who relies on > > it. > > > > > > > > > > > > > > > > > > > > > > On Wed, Mar 2, 2016 at 3:58 PM Joe Bowser wrote: > > > > > > > > > OK, so, I'm dealing with this code, which pisses me off to no end: > > > > > > > > > > if (Boolean.valueOf(cdvBuildMultipleApks)) { > > > > > productFlavors { > > > > > armv7 { > > > > > versionCode defaultConfig.versionCode + 2 > > > > > ndk { > > > > > abiFilters "armeabi-v7a", "" > > > > > } > > > > > } > > > > > x86 { > > > > > versionCode defaultConfig.versionCode + 4 > > > > > ndk { > > > > > abiFilters "x86", "" > > > > > } > > > > > } > > > > > all { > > > > > ndk { > > > > > abiFilters "all", "" > > > > > } > > > > > } > > > > > } > > > > > } else if (!cdvVersionCode) { > > > > > def minSdkVersion = cdvMinSdkVersion ?: > > > > > privateHelpers.extractIntFromManifest("minSdkVersion") > > > > > // Vary versionCode by the two most common API levels: > > > > > // 14 is ICS, which is the lowest API level for many apps. > > > > > // 20 is Lollipop, which is the lowest API level for the > > > updatable > > > > > system webview. > > > > > if (minSdkVersion >= 20) { > > > > > defaultConfig.versionCode += 9 > > > > > } else if (minSdkVersion >= 14) { > > > > > defaultConfig.versionCode += 8 > > > > > } > > > > > } > > > > > > > > > > So, right now if you're not using Crosswalk at all, your default > > > version > > > > > code will be 18 instead of 1, and 28 for the second version if you > > > aren't > > > > > using Crosswalk. I can see why people would build multiple APKs > per > > > > > architectures, but if you're building multiple APKs for different > > > > versions > > > > > of Android, we've all done something wrong and we never asked for > > this > > > > > feature to be added to Cordova. The whole point of Cordova is to > > work > > > > > across multiple platforms, and that does include multiple versions > of > > > > > Android. > > > > > > > > > > However, since this stupid code was added back in 4.0.x, I'm > > wondering > > > if > > > > > anyone is relying on this code before I rip it out and have version > > > codes > > > > > mean exactly what they're supposed to mean. That means that when > you > > > > build > > > > > and release your first app without using Crosswalk, your > application > > > > > version code will be 1. Not 18, not 19, but 1. Then when you > build > > > > > another version, that version will be 2, and so on. > > > > > > > > > > What do people think of this code going away? Crosswalk will > > probably > > > > have > > > > > to have the different version codes, since I think us defining a > > system > > > > > could work better than leaving this up to the user and having > things > > go > > > > > horribly sideways when people are trying to keep track of whether > > they > > > > > released an arm or x86 binary, since we already decided to take > > > > > responsibility for this. > > > > > > > > > > So, feedback on this would be good. > > > > > > > > > > On Thu, Feb 18, 2016 at 11:09 AM, Darryl Pogue > > > wrote: > > > > > > > > > > > Not intentionally on my end, but when I add the CrossWalk plugin > I > > > > > > seem to get two APKs as output (one for armv7, one for x86). > > > > > > > > > > > > On 18 February 2016 at 11:05, Joe Bowser > > wrote: > > > > > > > > > > > > > > Hey > > > > > > > > > > > > > > Based on the feedback on those two issues, and other places, I > > > think > > > > > that > > > > > > > most hated change from Cordova-Android 4.0 that we didn't fix > in > > > > > > > Cordova-Android 5.0 was the fact that we have an undocumented > way > > > of > > > > > > > generating an arbitrary build number that makes absolutely no > > > sense. > > > > > > > Furthermore, this screws up people's automated builds, and can > > > cause > > > > > the > > > > > > > version code to reach MAX_INT. > > > > > > > > > > > > > > If you want to know why nobody has touched it until now, it's > > > because > > > > > > > everyone hates working with Gradle. I can say the exact same > > thing > > > > > about > > > > > > > why we're not using ProGuard. > > > > > > > > > > > > > > Now, I'm starting on my flensing of the gradle files that we > have > > > in > > > > > > here, > > > > > > > trying to figure out what we can rip out and I'm wondering if > > > anyone > > > > is > > > > > > > actually using the multiple APK generation before I remove it. > If > > > > > people > > > > > > > are, I'm going to have to figure out another way for this to > > > happen, > > > > > > > because this is definitely breaking people's applications, and > > > using > > > > > > random > > > > > > > hooks isn't a good answer. > > > > > > > > > > > > > > So, is anyone using this, or can this feature die! > > > > > > > > > > > > > > Joe > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > > > > > > For additional commands, e-mail: dev-help@cordova.apache.org > > > > > > > > > > > > > > > > > > > > > > > > > > > --001a1145886e1db918052d180937--