|
@@ -21,94 +21,79 @@ if (flutterVersionName == null) {
|
|
flutterVersionName = '1.0'
|
|
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 keystoreProperties = new Properties()
|
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
if (keystorePropertiesFile.exists()) {
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
}
|
|
|
|
|
|
-apply plugin: 'com.android.application'
|
|
|
|
-apply plugin: 'kotlin-android'
|
|
|
|
-apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
|
|
|
-
|
|
|
|
android {
|
|
android {
|
|
compileSdkVersion 33
|
|
compileSdkVersion 33
|
|
-// compileSdkVersion flutter.compileSdkVersion
|
|
|
|
-
|
|
|
|
- compileOptions {
|
|
|
|
- sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
- targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- kotlinOptions {
|
|
|
|
- jvmTarget = '1.8'
|
|
|
|
- }
|
|
|
|
|
|
|
|
sourceSets {
|
|
sourceSets {
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ lintOptions {
|
|
|
|
+ disable 'InvalidPackage'
|
|
|
|
+ warningsAsErrors false
|
|
|
|
+ checkReleaseBuilds false
|
|
|
|
+ }
|
|
|
|
+
|
|
defaultConfig {
|
|
defaultConfig {
|
|
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
|
|
applicationId "io.ente.auth"
|
|
applicationId "io.ente.auth"
|
|
minSdkVersion 20
|
|
minSdkVersion 20
|
|
- targetSdkVersion 30
|
|
|
|
|
|
+ targetSdkVersion 33
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
versionName flutterVersionName
|
|
|
|
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
multiDexEnabled true
|
|
multiDexEnabled true
|
|
}
|
|
}
|
|
|
|
|
|
- // TODO: Remove when below fix is available in stable channel.
|
|
|
|
- // https://github.com/flutter/flutter/pull/82309
|
|
|
|
- lintOptions {
|
|
|
|
- checkReleaseBuilds false
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
signingConfigs {
|
|
signingConfigs {
|
|
- if (System.getenv("ANDROID_KEYSTORE_PATH")) {
|
|
|
|
- release {
|
|
|
|
- storeFile file(System.getenv("ANDROID_KEYSTORE_PATH"))
|
|
|
|
- keyAlias System.getenv("ANDROID_KEYSTORE_ALIAS")
|
|
|
|
- keyPassword System.getenv("ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
|
|
|
|
- storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD")
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- release {
|
|
|
|
- keyAlias keystoreProperties['keyAlias']
|
|
|
|
- keyPassword keystoreProperties['keyPassword']
|
|
|
|
- storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
|
|
|
- storePassword keystoreProperties['storePassword']
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ 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"
|
|
flavorDimensions "default"
|
|
productFlavors {
|
|
productFlavors {
|
|
- production {
|
|
|
|
|
|
+ independent {
|
|
dimension "default"
|
|
dimension "default"
|
|
- applicationIdSuffix ""
|
|
|
|
- manifestPlaceholders = [appName: "My App"]
|
|
|
|
|
|
+ applicationIdSuffix ".independent"
|
|
}
|
|
}
|
|
- staging {
|
|
|
|
|
|
+ playstore {
|
|
dimension "default"
|
|
dimension "default"
|
|
- applicationIdSuffix ".stg"
|
|
|
|
- manifestPlaceholders = [appName: "[STG] My App"]
|
|
|
|
- }
|
|
|
|
- development {
|
|
|
|
- dimension "default"
|
|
|
|
- applicationIdSuffix ".dev"
|
|
|
|
- manifestPlaceholders = [appName: "[DEV] My App"]
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
buildTypes {
|
|
buildTypes {
|
|
release {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
signingConfig signingConfigs.release
|
|
- minifyEnabled true
|
|
|
|
- proguardFiles getDefaultProguardFile('proguard-android.txt')
|
|
|
|
}
|
|
}
|
|
debug {
|
|
debug {
|
|
- signingConfig signingConfigs.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"
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -118,7 +103,11 @@ flutter {
|
|
}
|
|
}
|
|
|
|
|
|
dependencies {
|
|
dependencies {
|
|
|
|
+ implementation 'io.sentry:sentry-android:2.0.0'
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation 'com.android.support:multidex:1.0.3'
|
|
implementation 'com.android.support:multidex:1.0.3'
|
|
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
|
|
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'
|
|
}
|
|
}
|