Files
umbrix/android/app/build.gradle

116 lines
3.4 KiB
Groovy
Raw Normal View History

2023-07-06 17:18:41 +03:30
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
2023-08-22 08:56:48 +00:00
def keystoreProperties = new Properties()
def keystorePropertiesFile=rootProject.file('release.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
2023-07-06 17:18:41 +03:30
apply plugin: 'com.android.application'
2023-09-16 11:20:12 +02:00
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
// END: FlutterFire Configuration
2023-07-06 17:18:41 +03:30
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "com.hiddify.hiddify"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
2023-08-21 14:27:23 +00:00
applicationId "app.hiddify.com"
2023-07-06 17:18:41 +03:30
minSdkVersion 21
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
2023-08-22 08:05:05 +00:00
splits {
abi {
enable true
reset()
include "x86_64", "armeabi-v7a", "arm64-v8a"
2023-07-06 17:18:41 +03:30
2023-08-22 08:05:05 +00:00
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
universalApk true
}
}
2023-08-22 09:01:36 +00:00
2023-08-22 08:39:40 +00:00
signingConfigs {
2023-08-22 08:56:48 +00:00
release {
keyAlias keystoreProperties['key.alias']
keyPassword keystoreProperties['key.password']
storeFile keystoreProperties['keystore.path']? file(keystoreProperties['keystore.path']): null
storePassword keystoreProperties['keystore.password']
2023-07-06 17:18:41 +03:30
}
}
2023-08-22 09:01:36 +00:00
buildTypes {
release {
signingConfig signingConfigs.release
}
}
2023-08-22 08:05:05 +00:00
2023-08-19 22:27:23 +03:30
buildFeatures {
viewBinding true
aidl true
}
}
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
output.versionCodeOverride = android.defaultConfig.versionCode
}
2023-07-06 17:18:41 +03:30
}
flutter {
source '../..'
}
dependencies {
2023-08-19 22:27:23 +03:30
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
2023-08-29 19:16:17 +03:30
implementation 'com.google.code.gson:gson:2.10.1'
2023-07-06 17:18:41 +03:30
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
2023-08-19 22:27:23 +03:30
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
2023-07-06 17:18:41 +03:30
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
implementation 'androidx.window:window:1.0.0'
implementation 'androidx.window:window-java:1.0.0'
}