123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- 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"
- def keystoreProperties = new Properties()
- def keystorePropertiesFile = rootProject.file('key.properties')
- if (keystorePropertiesFile.exists()) {
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
- }
- android {
- compileSdkVersion 33
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
- lintOptions {
- disable 'InvalidPackage'
- warningsAsErrors false
- checkReleaseBuilds false
- }
- defaultConfig {
- applicationId "io.ente.auth"
- minSdkVersion 20
- targetSdkVersion 33
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- multiDexEnabled true
- }
- signingConfigs {
- release {
- storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : file(System.getenv("SIGNING_KEY_PATH"))
- 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")
- }
- }
-
- flavorDimensions "default"
- productFlavors {
- independent {
- dimension "default"
- applicationIdSuffix ".independent"
- }
- playstore {
- dimension "default"
- }
- fdroid {
- dimension "default"
- }
- }
- buildTypes {
- release {
- signingConfig signingConfigs.release
- }
- debug {
- applicationIdSuffix '.debug'
- versionNameSuffix "-debug"
- externalNativeBuild {
- cmake {
- arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}${applicationIdSuffix}"
- }
- }
- }
- }
- android.applicationVariants.all { variant ->
- if (variant.flavorName == "fdroid") {
- variant.outputs.all { output ->
- output.outputFileName = "app-fdroid-release.apk"
- }
- }
- }
- }
- flutter {
- source '../..'
- }
- dependencies {
- implementation 'io.sentry:sentry-android:2.0.0'
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'com.android.support:multidex:1.0.3'
- implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'androidx.test:runner:1.1.1'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
- }
|