2017-12-10 16:46:13 +03:00
|
|
|
buildscript {
|
2018-02-08 07:54:25 +03:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
jcenter()
|
2019-03-20 23:42:19 +03:00
|
|
|
google()
|
2018-02-08 07:54:25 +03:00
|
|
|
}
|
|
|
|
dependencies {
|
2019-08-22 05:00:50 +03:00
|
|
|
classpath 'com.android.tools.build:gradle:3.4.2'
|
2018-02-08 07:54:25 +03:00
|
|
|
}
|
2017-12-10 16:46:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
2018-02-07 22:50:15 +03:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
maven {
|
|
|
|
url 'https://maven.google.com'
|
|
|
|
}
|
2019-08-22 05:00:50 +03:00
|
|
|
google()
|
2018-02-07 22:50:15 +03:00
|
|
|
}
|
|
|
|
|
2018-09-25 03:37:34 +03:00
|
|
|
dependencies {
|
2019-08-22 05:00:50 +03:00
|
|
|
implementation 'androidx.core:core:1.0.2'
|
2020-10-24 07:40:22 +03:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.0.2'
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
2018-09-25 03:37:34 +03:00
|
|
|
}
|
|
|
|
|
2017-12-10 16:46:13 +03:00
|
|
|
android {
|
2019-08-22 05:00:50 +03:00
|
|
|
compileSdkVersion 29
|
2019-03-20 23:42:19 +03:00
|
|
|
buildToolsVersion "28.0.3"
|
2018-02-08 07:54:25 +03:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.purplei2p.i2pd"
|
2019-08-22 05:00:50 +03:00
|
|
|
targetSdkVersion 29
|
2018-02-08 07:54:25 +03:00
|
|
|
minSdkVersion 14
|
2020-10-27 19:27:08 +03:00
|
|
|
versionCode 2340
|
|
|
|
versionName "2.34.0"
|
2020-03-01 02:08:43 +03:00
|
|
|
setProperty("archivesBaseName", archivesBaseName + "-" + versionName)
|
2018-02-08 07:54:25 +03:00
|
|
|
ndk {
|
|
|
|
abiFilters 'armeabi-v7a'
|
2018-07-21 00:02:54 +03:00
|
|
|
abiFilters 'x86'
|
2019-01-18 15:44:30 +03:00
|
|
|
//abiFilters 'arm64-v8a'
|
|
|
|
//abiFilters 'x86_64'
|
2018-07-21 00:02:54 +03:00
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
2019-01-18 15:44:30 +03:00
|
|
|
arguments "-j3"
|
2018-07-21 00:02:54 +03:00
|
|
|
}
|
2018-01-22 20:59:34 +03:00
|
|
|
}
|
2018-02-08 07:54:25 +03:00
|
|
|
}
|
2017-12-10 16:46:13 +03:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
|
|
java.srcDirs = ['src']
|
2018-02-08 07:54:25 +03:00
|
|
|
res.srcDirs = ['res']
|
|
|
|
jniLibs.srcDirs = ['libs']
|
2018-06-27 23:20:02 +03:00
|
|
|
assets.srcDirs = ['assets']
|
2017-12-10 16:46:13 +03:00
|
|
|
}
|
2018-02-08 07:54:25 +03:00
|
|
|
}
|
2019-01-18 15:44:30 +03:00
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
// change that to true if you need splitted apk
|
2020-03-01 02:08:43 +03:00
|
|
|
enable true
|
2019-01-18 15:44:30 +03:00
|
|
|
reset()
|
2020-03-01 02:08:43 +03:00
|
|
|
//include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
|
|
include "armeabi-v7a", "x86"
|
2019-01-18 15:44:30 +03:00
|
|
|
universalApk true
|
|
|
|
}
|
|
|
|
}
|
2017-12-10 17:01:13 +03:00
|
|
|
signingConfigs {
|
|
|
|
orignal {
|
|
|
|
storeFile file("i2pdapk.jks")
|
|
|
|
storePassword "android"
|
|
|
|
keyAlias "i2pdapk"
|
|
|
|
keyPassword "android"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes {
|
2018-02-08 07:54:25 +03:00
|
|
|
release {
|
2020-03-01 02:08:43 +03:00
|
|
|
minifyEnabled false
|
2018-02-08 07:54:25 +03:00
|
|
|
signingConfig signingConfigs.orignal
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
ndkBuild {
|
|
|
|
path './jni/Android.mk'
|
|
|
|
}
|
2017-12-10 17:01:13 +03:00
|
|
|
}
|
2019-08-22 05:00:50 +03:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = '1.8'
|
|
|
|
targetCompatibility = '1.8'
|
|
|
|
}
|
2017-12-10 16:46:13 +03:00
|
|
|
}
|
2020-03-01 02:08:43 +03:00
|
|
|
|
2020-10-24 07:40:22 +03:00
|
|
|
ext.abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'arm64-v8a': 3, 'x86_64': 4]
|
2020-03-01 02:08:43 +03: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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|