Files
amnezia-client/client/android/build.gradle
T

154 lines
4.8 KiB
Groovy
Raw Normal View History

2022-04-01 10:05:58 +05:30
apply plugin: 'com.github.ben-manes.versions'
2021-08-08 18:10:09 +03:00
buildscript {
2021-09-30 15:56:48 +03:00
ext{
kotlin_version = "1.7.22"
2021-09-30 15:56:48 +03:00
// for libwg
appcompatVersion = '1.1.0'
annotationsVersion = '1.0.1'
databindingVersion = '3.3.1'
jsr305Version = '3.0.2'
streamsupportVersion = '1.7.0'
threetenabpVersion = '1.1.1'
groupName = 'org.amnezia.vpn'
minSdkVer = '24'
cmakeMinVersion = "3.25.0+"
2021-09-30 15:56:48 +03:00
}
2021-08-08 18:10:09 +03:00
repositories {
google()
jcenter()
2021-09-30 15:56:48 +03:00
mavenCentral()
maven { url = uri("https://jitpack.io") }
2021-08-08 18:10:09 +03:00
}
dependencies {
2023-01-17 16:12:42 +03:00
classpath 'com.android.tools.build:gradle:7.2.1'
2022-04-01 10:05:58 +05:30
classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.8.0'
2021-09-30 15:56:48 +03:00
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
2021-08-08 18:10:09 +03:00
}
}
apply plugin: 'com.android.application'
2021-09-30 15:56:48 +03:00
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlinx-serialization'
2022-04-01 10:05:58 +05:30
apply plugin: 'kotlin-kapt'
2021-08-08 18:10:09 +03:00
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation group: 'org.json', name: 'json', version: '20220924'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
2021-09-30 15:56:48 +03:00
implementation "androidx.security:security-crypto:1.1.0-alpha03"
implementation "androidx.security:security-identity-credential:1.0.0-alpha02"
2021-09-30 15:56:48 +03:00
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2"
2022-04-26 23:49:20 +05:30
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
implementation project(path: ':shadowsocks')
// CameraX core library using the camera2 implementation
def camerax_version = "1.2.1"
implementation("androidx.camera:camera-core:${camerax_version}")
implementation("androidx.camera:camera-camera2:${camerax_version}")
implementation("androidx.camera:camera-lifecycle:${camerax_version}")
implementation("androidx.camera:camera-view:${camerax_version}")
implementation("androidx.camera:camera-extensions:${camerax_version}")
def camerax_ml_version = "1.2.0-beta02"
def ml_kit_version = "17.0.3"
implementation("androidx.camera:camera-mlkit-vision:${camerax_ml_version}")
implementation("com.google.mlkit:barcode-scanning:${ml_kit_version}")
2022-04-01 10:05:58 +05:30
}
androidExtensions {
experimental = true
2021-08-08 18:10:09 +03:00
}
android {
/*******************************************************
* The following variables:
* - androidBuildToolsVersion,
* - androidCompileSdkVersion
2023-03-29 16:09:46 +03:00
* - qtAndroidDir - holds the path to qt android files
2021-08-08 18:10:09 +03:00
* needed to build any Qt application
* on Android.
*
* are defined in gradle.properties file. This file is
* updated by QtCreator and androiddeployqt tools.
* Changing them manually might break the compilation!
*******************************************************/
compileSdkVersion androidCompileSdkVersion.toInteger()
2022-12-23 17:32:20 +03:00
buildToolsVersion androidBuildToolsVersion
ndkVersion androidNdkVersion
// Extract native libraries from the APK
packagingOptions.jniLibs.useLegacyPackaging true
2021-08-08 18:10:09 +03:00
2021-10-01 03:01:48 +03:00
dexOptions {
javaMaxHeapSize "3g"
}
2021-08-08 18:10:09 +03:00
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
2022-12-23 17:32:20 +03:00
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qtAndroidDir + '/res', 'res']
2021-08-08 18:10:09 +03:00
resources.srcDirs = ['resources']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
2023-03-29 16:09:46 +03:00
androidTest.assets.srcDirs += files("${qtAndroidDir}/schemas".toString())
2021-08-08 18:10:09 +03:00
}
}
tasks.withType(JavaCompile) {
options.incremental = true
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
2021-08-08 18:10:09 +03:00
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
2022-03-17 11:38:48 +05:30
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
2021-08-08 18:10:09 +03:00
lintOptions {
abortOnError false
}
// Do not compress Qt binary resources file
aaptOptions {
noCompress 'rcc'
}
defaultConfig {
resConfig "en"
2021-09-30 15:56:48 +03:00
minSdkVersion = 24
2023-06-18 17:49:03 +01:00
targetSdkVersion = 34
2023-08-13 15:22:24 +01:00
versionCode 31 // Change to a higher number
versionName "3.0.9" // Change to a higher number
2022-04-01 10:05:58 +05:30
javaCompileOptions.annotationProcessorOptions.arguments = [
2023-03-29 16:09:46 +03:00
"room.schemaLocation": "${qtAndroidDir}/schemas".toString()
2022-04-01 10:05:58 +05:30
]
2021-08-08 18:10:09 +03:00
}
2021-09-30 15:56:48 +03:00
2022-08-09 17:06:03 +03:00
2021-08-08 18:10:09 +03:00
}
2021-10-06 22:45:25 +03:00