-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,61 @@ | ||
// Add your native dependencies here: | ||
|
||
// Uncomment to add recyclerview-v7 dependency | ||
// dependencies { | ||
// compile "com.google.android.gms:play-services-base:15.0.1" | ||
// compile 'com.android.support:recyclerview-v7:+' | ||
// } | ||
|
||
android { | ||
android { | ||
defaultConfig { | ||
buildToolsVersion "28.0.3" | ||
compileSdkVersion 28 | ||
generatedDensities = [] | ||
multiDexEnabled true | ||
applicationId = "org.nativescript.curiosity" | ||
minSdkVersion 19 | ||
minSdkVersion 21 | ||
targetSdkVersion 28 | ||
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 | ||
} | ||
} | ||
} | ||
|
||
aaptOptions { | ||
additionalParameters "--no-version-vectors" | ||
} | ||
|
||
dexOptions { | ||
jumboMode true | ||
javaMaxHeapSize "4g" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters