ente/android/app/build.gradle

135 lines
4.1 KiB
Groovy
Raw Normal View History

2020-03-24 19:59:36 +00:00
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'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2020-05-06 15:05:09 +00:00
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
2020-03-24 19:59:36 +00:00
android {
compileSdkVersion 33
2020-03-24 19:59:36 +00:00
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
2021-07-31 07:10:40 +00:00
warningsAsErrors false
2021-07-31 08:09:03 +00:00
checkReleaseBuilds false
2020-03-24 19:59:36 +00:00
}
defaultConfig {
2020-05-01 18:20:12 +00:00
applicationId "io.ente.photos"
2023-02-08 14:20:17 +00:00
minSdkVersion 21
targetSdkVersion 33
2020-03-24 19:59:36 +00:00
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2020-12-03 23:16:53 +00:00
multiDexEnabled true
2020-03-24 19:59:36 +00:00
}
2020-05-06 15:05:09 +00:00
signingConfigs {
release {
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : file(System.getenv("SIGNING_KEY_PATH"))
2021-07-31 11:54:52 +00:00
keyAlias keystoreProperties['keyAlias'] ? keystoreProperties['keyAlias'] : System.getenv("SIGNING_KEY_ALIAS")
keyPassword keystoreProperties['keyPassword'] ? keystoreProperties['keyPassword'] : System.getenv("SIGNING_KEY_PASSWORD")
storePassword keystoreProperties['storePassword'] ? keystoreProperties['storePassword'] : System.getenv("SIGNING_STORE_PASSWORD")
2020-05-06 15:05:09 +00:00
}
}
flavorDimensions "default"
productFlavors {
independent {
dimension "default"
applicationIdSuffix ".independent"
}
2023-01-03 16:31:04 +00:00
dev {
dimension "default"
applicationIdSuffix ".dev"
}
2021-05-22 21:21:44 +00:00
playstore {
dimension "default"
}
2022-04-21 23:18:18 +00:00
fdroid {
dimension "default"
applicationIdSuffix ".fdroid"
}
}
2020-05-06 15:05:09 +00:00
2020-03-24 19:59:36 +00:00
buildTypes {
release {
2020-05-06 15:05:09 +00:00
signingConfig signingConfigs.release
2020-03-24 19:59:36 +00:00
}
debug {
applicationIdSuffix '.debug'
versionNameSuffix "-debug"
externalNativeBuild {
cmake {
arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}${applicationIdSuffix}"
}
}
}
2020-03-24 19:59:36 +00:00
}
2022-04-21 23:18:18 +00:00
android.applicationVariants.all { variant ->
if (variant.flavorName == "fdroid") {
variant.outputs.all { output ->
output.outputFileName = "app-fdroid-release.apk"
}
}
}
2020-03-24 19:59:36 +00:00
}
2020-04-21 11:48:56 +00:00
rootProject.allprojects {
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.github.bumptech.glide'
&& details.requested.name.contains('glide')) {
details.useVersion "4.9.0"
}
}
}
}
}
2020-03-24 19:59:36 +00:00
flutter {
source '../..'
}
dependencies {
implementation 'io.sentry:sentry-android:2.0.0'
2020-03-24 19:59:36 +00:00
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
2020-12-03 23:16:53 +00:00
implementation 'com.android.support:multidex:1.0.3'
2021-01-08 09:24:15 +00:00
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
2020-03-24 19:59:36 +00:00
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}