1
0
mirror of https://github.com/PurpleI2P/i2pd-android.git synced 2025-01-10 06:48:02 +00:00
i2pd-android/app/build.gradle

106 lines
2.7 KiB
Groovy
Raw Normal View History

2020-06-06 00:51:41 +00:00
plugins {
id 'com.android.application'
}
dependencies {
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
2024-04-07 08:34:30 +00:00
// implementation 'org.ini4j:ini4j:0.5.4'
implementation 'org.apache.commons:commons-configuration2:2.9.0'
}
configurations {
all{
//exclude group: 'commons-logging', module: 'commons-logging'
//exclude group: 'org.apache.httpcomponents'
exclude module: 'httpclient'
}
2020-06-06 00:51:41 +00:00
}
android {
2024-04-07 08:34:30 +00:00
lintOptions {
// Not so a good way
disable 'DuplicatePlatformClasses'
}
compileSdkVersion 33
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
defaultConfig {
applicationId "org.purplei2p.i2pd"
targetSdkVersion 33
2024-04-07 08:34:30 +00:00
// TODO: 24?
minSdkVersion 16
versionCode 2520000
versionName "2.52.0"
archivesBaseName += "-$versionName"
ndkVersion "23.2.8568313"
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
ndk {
abiFilters "armeabi-v7a"
abiFilters "x86"
abiFilters "arm64-v8a"
abiFilters "x86_64"
2020-06-06 00:51:41 +00:00
}
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
externalNativeBuild {
ndkBuild {
2020-06-06 02:27:29 +00:00
arguments "NDK_MODULE_PATH:=${rootProject.projectDir}/app/jni"
arguments "-j${Runtime.getRuntime().availableProcessors()}"
2020-06-06 00:51:41 +00:00
}
}
}
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
splits {
abi {
// change that to true if you need splitted apk
enable true
reset()
2020-06-06 02:27:29 +00:00
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
2020-06-06 00:51:41 +00:00
universalApk true
}
}
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
signingConfigs {
release {
storeFile file("i2pdapk.jks")
2020-06-06 00:51:41 +00:00
storePassword "android"
keyAlias "i2pdapk"
keyPassword "android"
}
}
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
buildTypes {
release {
signingConfig signingConfigs.release
2020-06-06 00:51:41 +00:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
debug {
jniDebuggable = true
}
2020-06-06 00:51:41 +00:00
}
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
externalNativeBuild {
ndkBuild {
path "${rootProject.projectDir}/app/jni/Android.mk"
2020-06-06 00:51:41 +00:00
}
}
2020-06-06 02:27:29 +00:00
2020-06-06 00:51:41 +00:00
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
2020-06-06 00:51:41 +00:00
}
namespace 'org.purplei2p.i2pd'
2020-06-06 00:51:41 +00:00
}
ext.abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'arm64-v8a': 3, 'x86_64': 4]
2020-06-06 00:51:41 +00:00
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
2020-06-06 00:51:41 +00:00
}
}
}