From 8757261dcf95f27cefaff7fdff7212d6b6bac845 Mon Sep 17 00:00:00 2001 From: NickIliev Date: Tue, 16 Jul 2019 15:05:45 +0300 Subject: [PATCH] chore: version migration to 6 --- app/App_Resources/Android/app.gradle | 68 +++++++++---------- .../Android/src/main/AndroidManifest.xml | 4 +- nsconfig.json | 4 +- package.json | 12 ++-- webpack.config.js | 6 +- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/app/App_Resources/Android/app.gradle b/app/App_Resources/Android/app.gradle index 0749485..ccff7ec 100644 --- a/app/App_Resources/Android/app.gradle +++ b/app/App_Resources/Android/app.gradle @@ -13,42 +13,42 @@ android { multiDexEnabled true minSdkVersion 19 targetSdkVersion 28 - ndk { - abiFilters.clear() // ABI Splits related code - I need NDK 17rc1 to ensure proper ABI splits creation - } + // ndk { + // abiFilters.clear() // ABI Splits related code - I need NDK 17rc1 to ensure proper ABI splits creation + // } } - // ABI Splits related code - splits { - - // Configures multiple APKs based on Applicaiton Binary Interfaces (ABI) - abi { - enable true // enables the ABIs split mechanism - reset() // Clears the default list from all ABIs to no ABIs - include 'arm64-v8a', 'armeabi-v7a', 'x86' // Spcifies a list of ABIs Gradle should createa APKs for. - universalApk true // false to skip generting the universal APK - } - } - - // ABI Splits related code - sourceSets { - main { - jniLibs.srcDirs = ["$projectDir/libs/jni", "$projectDir/snapshot-build/build/ndk-build/libs"] - } - } - - // ABI Splits related code - Different version codes (so I could upload the different splits to Google Console) - project.ext.abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3].withDefault{0} - - android.applicationVariants.all { variant -> - variant.outputs.each { output -> - def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter("ABI"), 0) - - if (baseAbiVersionCode != null) { - output.versionCodeOverride = baseAbiVersionCode * 100000 + variant.versionCode - } - } - } + // // ABI Splits related code + // splits { + + // // Configures multiple APKs based on Applicaiton Binary Interfaces (ABI) + // abi { + // enable true // enables the ABIs split mechanism + // reset() // Clears the default list from all ABIs to no ABIs + // include 'arm64-v8a', 'armeabi-v7a', 'x86' // Spcifies a list of ABIs Gradle should createa APKs for. + // universalApk true // false to skip generting the universal APK + // } + // } + + // // ABI Splits related code + // sourceSets { + // main { + // jniLibs.srcDirs = ["$projectDir/libs/jni", "$projectDir/snapshot-build/build/ndk-build/libs"] + // } + // } + + // // ABI Splits related code - Different version codes (so I could upload the different splits to Google Console) + // project.ext.abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3].withDefault{0} + + // android.applicationVariants.all { variant -> + // variant.outputs.each { output -> + // def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter("ABI"), 0) + + // if (baseAbiVersionCode != null) { + // output.versionCodeOverride = baseAbiVersionCode * 100000 + variant.versionCode + // } + // } + // } aaptOptions { additionalParameters "--no-version-vectors" diff --git a/app/App_Resources/Android/src/main/AndroidManifest.xml b/app/App_Resources/Android/src/main/AndroidManifest.xml index 3996261..b297be3 100644 --- a/app/App_Resources/Android/src/main/AndroidManifest.xml +++ b/app/App_Resources/Android/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="28" + android:versionName="2.9.1"> { // Default destination inside platforms//... const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); - const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS"; const { // The 'appPath' and 'appResourcesPath' values are fetched from @@ -109,6 +108,7 @@ module.exports = env => { itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); } + nsWebpack.processAppComponents(appComponents, platform); const config = { mode: production ? "production" : "development", context: appFullPath, @@ -213,6 +213,7 @@ module.exports = env => { unitTesting, appFullPath, projectRoot, + ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) } }, ].filter(loader => !!loader) @@ -262,12 +263,13 @@ module.exports = env => { // Define useful constants like TNS_WEBPACK new webpack.DefinePlugin({ "global.TNS_WEBPACK": "true", - "process": undefined, + "process": "global.process", }), // Remove all files from the out dir. new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), // Copy assets to out dir. Add your own globs as needed. new CopyWebpackPlugin([ + { from: { glob: "settings.json"} }, // HERE { from: { glob: "fonts/**" } }, { from: { glob: "**/*.jpg" } }, { from: { glob: "**/*.png" } },