|
|
|
plugins {
|
|
|
|
id 'com.android.application'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation 'androidx.core:core:1.0.2'
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 29
|
|
|
|
buildToolsVersion "28.0.3"
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.purplei2p.i2pd"
|
|
|
|
targetSdkVersion 29
|
|
|
|
minSdkVersion 14
|
|
|
|
versionCode 23210
|
|
|
|
versionName "2.32.1"
|
|
|
|
setProperty("archivesBaseName", archivesBaseName + "-" + versionName)
|
|
|
|
|
|
|
|
ndk {
|
|
|
|
abiFilters 'armeabi-v7a'
|
|
|
|
abiFilters 'x86'
|
|
|
|
abiFilters 'arm64-v8a'
|
|
|
|
abiFilters 'x86_64'
|
|
|
|
}
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
arguments "NDK_MODULE_PATH:=${rootProject.projectDir}/app/jni"
|
|
|
|
arguments "-j3"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
// change that to true if you need splitted apk
|
|
|
|
enable true
|
|
|
|
reset()
|
|
|
|
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
|
|
//include "armeabi-v7a", "x86"
|
|
|
|
universalApk true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
orignal {
|
|
|
|
storeFile file("i2pdapk.jks")
|
|
|
|
storePassword "android"
|
|
|
|
keyAlias "i2pdapk"
|
|
|
|
keyPassword "android"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
signingConfig signingConfigs.orignal
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
path './jni/Android.mk'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = '1.8'
|
|
|
|
targetCompatibility = '1.8'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ext.abiCodes = ['armeabi-v7a':1, 'x86':2, 'arm64-v8a':3, 'x86_64':4]
|
|
|
|
import com.android.build.OutputFile
|
|
|
|
|
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
variant.outputs.each { output ->
|
|
|
|
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
|
|
|
|
|
|
|
|
if (baseAbiVersionCode != null) {
|
|
|
|
output.versionCodeOverride = baseAbiVersionCode + variant.versionCode
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|