|
|
|
plugins {
|
|
|
|
id 'com.android.application'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation 'androidx.core:core:1.6.0'
|
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 32
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.purplei2p.i2pd"
|
|
|
|
targetSdkVersion 32
|
|
|
|
minSdkVersion 16
|
|
|
|
versionCode 2450000
|
|
|
|
versionName "2.45.0"
|
|
|
|
archivesBaseName += "-$versionName"
|
|
|
|
ndkVersion "23.2.8568313"
|
|
|
|
|
|
|
|
ndk {
|
|
|
|
abiFilters "armeabi-v7a"
|
|
|
|
abiFilters "x86"
|
|
|
|
abiFilters "arm64-v8a"
|
|
|
|
abiFilters "x86_64"
|
|
|
|
}
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
arguments "NDK_MODULE_PATH:=${rootProject.projectDir}/app/jni"
|
|
|
|
arguments "-j${Runtime.getRuntime().availableProcessors()}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
// change that to true if you need splitted apk
|
|
|
|
enable true
|
|
|
|
reset()
|
|
|
|
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
|
|
universalApk true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file("i2pdapk.jks")
|
|
|
|
storePassword "android"
|
|
|
|
keyAlias "i2pdapk"
|
|
|
|
keyPassword "android"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
|
|
|
}
|
|
|
|
debug {
|
|
|
|
jniDebuggable = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
path "${rootProject.projectDir}/app/jni/Android.mk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_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 * 10 + variant.versionCode
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|