diff --git a/app/build.gradle b/app/build.gradle index 4f02fb91..4ec9bd31 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,5 @@ +import android.annotation.SuppressLint + apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' @@ -20,8 +22,9 @@ android { buildConfigField "java.util.Map", "GIT_INFO", gitInfoMap buildConfigField "String", "VERSION_BASE", "\"${release.versionName}\"" + manifestPlaceholders = [ - buildTimestamp: String.valueOf(System.currentTimeMillis()) + buildTimestamp: String.valueOf(System.currentTimeMillis()) ] multiDexEnabled = true @@ -36,8 +39,8 @@ android { arguments { arg("room.schemaLocation", "$projectDir/schemas") } - correctErrorTypes true + correctErrorTypes true } } @@ -45,10 +48,12 @@ android { debug { getIsDefault().set(true) minifyEnabled = false + applicationIdSuffix ".debug" manifestPlaceholders = [ - buildTimestamp: 0 + buildTimestamp: 0 ] } + release { minifyEnabled = true shrinkResources = true @@ -56,28 +61,35 @@ android { proguardFiles fileTree('proguard').asList().toArray() } } - flavorDimensions "platform" + + flavorDimensions += "platform" + productFlavors { unofficial { getIsDefault().set(true) versionName "${release.versionName}-${gitInfo.versionSuffix}" } + official {} play {} } + variantFilter { variant -> def flavors = variant.flavors*.name setIgnore(variant.buildType.name == "debug" && !flavors.contains("unofficial") || flavors.contains("main")) } + sourceSets { unofficial { java.srcDirs = ["src/main/java", "src/play-not/java"] manifest.srcFile("src/play-not/AndroidManifest.xml") } + official { java.srcDirs = ["src/main/java", "src/play-not/java"] manifest.srcFile("src/play-not/AndroidManifest.xml") } + play { java.srcDirs = ["src/main/java", "src/play/java"] } @@ -86,35 +98,41 @@ android { defaultConfig { vectorDrawables.useSupportLibrary = true } + buildFeatures { dataBinding = true viewBinding = true - buildConfig true + buildConfig = true } + compileOptions { coreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } + kotlinOptions { jvmTarget = "1.8" } + packagingOptions { resources { excludes += ['META-INF/library-core_release.kotlin_module'] } } + externalNativeBuild { cmake { path "src/main/cpp/CMakeLists.txt" version "3.10.2" } } + lint { checkReleaseBuilds false } - namespace 'pl.szczodrzynski.edziennik' + namespace 'pl.szczodrzynski.edziennik' } tasks.whenTaskAdded { task -> diff --git a/app/google-services.json b/app/google-services.json index 247bf747..8412fad0 100644 --- a/app/google-services.json +++ b/app/google-services.json @@ -36,6 +36,37 @@ "status": 2 } } + }, + { + "client_info": { + "mobilesdk_app_id": "1:640759989760:android:4aa71407b25cdc8d", + "android_client_info": { + "package_name": "pl.szczodrzynski.edziennik.debug" + } + }, + "oauth_client": [ + { + "client_id": "640759989760-6f8q00u864lnuh3gh36e8g4cer9lv8pv.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAvq9HMPxulz9ntdAHZ0eZuPf2YQs4nDSU" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 2 + } + } } ], "configuration_version": "1" diff --git a/app/src/debug/res/mipmap-hdpi/ic_launcher_monochrome_foreground.png b/app/src/debug/res/mipmap-hdpi/ic_launcher_monochrome_foreground.png new file mode 100644 index 00000000..c9d04eb5 Binary files /dev/null and b/app/src/debug/res/mipmap-hdpi/ic_launcher_monochrome_foreground.png differ diff --git a/app/src/debug/res/mipmap-mdpi/ic_launcher_monochrome_foreground.png b/app/src/debug/res/mipmap-mdpi/ic_launcher_monochrome_foreground.png new file mode 100644 index 00000000..60b46299 Binary files /dev/null and b/app/src/debug/res/mipmap-mdpi/ic_launcher_monochrome_foreground.png differ diff --git a/app/src/debug/res/mipmap-xhdpi/ic_launcher_monochrome_foreground.png b/app/src/debug/res/mipmap-xhdpi/ic_launcher_monochrome_foreground.png new file mode 100644 index 00000000..78a6d41c Binary files /dev/null and b/app/src/debug/res/mipmap-xhdpi/ic_launcher_monochrome_foreground.png differ diff --git a/app/src/debug/res/mipmap-xxhdpi/ic_launcher_monochrome_foreground.png b/app/src/debug/res/mipmap-xxhdpi/ic_launcher_monochrome_foreground.png new file mode 100644 index 00000000..88b09b03 Binary files /dev/null and b/app/src/debug/res/mipmap-xxhdpi/ic_launcher_monochrome_foreground.png differ diff --git a/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_monochrome_foreground.png b/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_monochrome_foreground.png new file mode 100644 index 00000000..745f84c0 Binary files /dev/null and b/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_monochrome_foreground.png differ diff --git a/app/src/debug/res/values/ic_launcher_background.xml b/app/src/debug/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..4935ad16 --- /dev/null +++ b/app/src/debug/res/values/ic_launcher_background.xml @@ -0,0 +1,8 @@ + + + + + #FF7D54 + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c7f3d68c..c5335573 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -41,7 +41,6 @@ |___/ --> @@ -134,7 +133,6 @@ android:theme="@style/DeadTheme" />