diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 097adc1cc..31cb0e306 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -15,7 +15,7 @@ jobs: - name: Run script run: | chmod +x ./gdx/check_import.sh - bash ./gdx/check_import.sh ./gdx/build.gradle + bash ./gdx/check_import.sh ./gdx/build.gradle.kts shell: bash ktlint: diff --git a/about/build.gradle b/about/build.gradle deleted file mode 100644 index 1a5e97b78..000000000 --- a/about/build.gradle +++ /dev/null @@ -1,80 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.about' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - buildFeatures { - viewBinding true - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':core') - implementation project(':i18n') - implementation project(':preferences') - implementation project(':ui') - implementation project(':utils') - implementation project(':tutorial') - implementation project(':external') - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // RecyclerView - implementation 'androidx.recyclerview:recyclerview:1.3.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Kotlin Lib - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' -} \ No newline at end of file diff --git a/about/build.gradle.kts b/about/build.gradle.kts new file mode 100644 index 000000000..0f523043b --- /dev/null +++ b/about/build.gradle.kts @@ -0,0 +1,82 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.about" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":i18n")) + implementation(project(":preferences")) + implementation(project(":ui")) + implementation(project(":utils")) + implementation(project(":tutorial")) + implementation(project(":external")) + + // Google + implementation(libs.material) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // RecyclerView + implementation(libs.recyclerview) + + // Constraint + implementation(libs.constraintlayout) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Coroutines + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + + // Kotlin Lib + implementation(libs.kotlin.stdlib) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) +} diff --git a/about/proguard-rules.pro b/about/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/about/proguard-rules.pro +++ b/about/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index 6e4bfa74d..000000000 --- a/app/build.gradle +++ /dev/null @@ -1,207 +0,0 @@ -plugins { - id 'com.android.application' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine' - - defaultConfig { - // versionCode and versionName must be hardcoded to support F-droid - versionCode 1705111 - versionName '17.5.11' - minSdk 21 - targetSdk 34 - compileSdk 34 - multiDexEnabled true - vectorDrawables.useSupportLibrary true - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - testInstrumentationRunnerArguments clearPackageData: 'true' - } - - signingConfigs { - release { - if (System.getenv('IS_RELEASE_BUILD')) { - storeFile file('../keystore') - keyAlias System.getenv('BITRISEIO_ANDROID_KEYSTORE_ALIAS') - storePassword System.getenv('BITRISEIO_ANDROID_KEYSTORE_PASSWORD') - keyPassword System.getenv('BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD') - } - } - } - - buildTypes { - debug { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - - release { - minifyEnabled true - shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.release - } - } - - buildFeatures { - buildConfig true - viewBinding true - } - - compileOptions { - targetCompatibility = JavaVersion.VERSION_17 - sourceCompatibility = JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() - } - - testOptions { - unitTests { - includeAndroidResources true - animationsDisabled true - } - } - - flavorDimensions = ['version'] - productFlavors { - google { - dimension 'version' - applicationId 'dev.lucasnlm.antimine' - versionNameSuffix ' S' - - apply plugin: 'com.google.gms.google-services' - apply plugin: 'com.bugsnag.android.gradle' - } - - googleInstant { - versionCode 163 - dimension 'version' - applicationId 'dev.lucasnlm.antimine' - versionNameSuffix ' I' - - apply plugin: 'com.google.gms.google-services' - } - - foss { - dimension 'version' - // There's a typo on F-Droid release :( - applicationId 'dev.lucanlm.antimine' - versionNameSuffix ' F' - } - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation project(':external') - implementation project(':common') - implementation project(':control') - implementation project(':about') - implementation project(':ui') - implementation project(':utils') - implementation project(':preferences') - implementation project(':themes') - implementation project(':tutorial') - implementation project(':core') - implementation project(':gdx') - - googleImplementation project(':proprietary') - googleInstantImplementation project(':proprietary') - googleInstantImplementation project(':instant') - fossImplementation project(':foss') - fossImplementation project(':donation') - - googleImplementation project(':audio') - fossImplementation project(':audio') - googleInstantImplementation project(':audio-low') - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.preference:preference-ktx:1.2.1' - implementation 'androidx.recyclerview:recyclerview:1.3.2' - implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-common-java8:2.6.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Kotlin - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Konfetti - implementation 'nl.dionsegijn:konfetti-xml:2.0.3' - - // Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'androidx.core:core-ktx:1.12.0' - testImplementation 'androidx.test:core-ktx:1.5.0' - testImplementation 'androidx.test:rules:1.5.0' - testImplementation 'androidx.test:runner:1.5.2' - testImplementation 'androidx.test.espresso:espresso-core:3.5.1' - testImplementation 'androidx.fragment:fragment-testing:1.6.2' - testImplementation 'org.robolectric:robolectric:4.5.1' - testImplementation 'androidx.test.ext:junit:1.1.5' - testImplementation 'io.mockk:mockk:1.13.5' - - // Core library - androidTestImplementation 'androidx.test:core:1.5.0' - - // AndroidJUnitRunner and JUnit Rules - androidTestImplementation 'androidx.test:core:1.5.0' - androidTestImplementation 'androidx.test:core-ktx:1.5.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - androidTestImplementation 'androidx.test:runner:1.5.2' - androidTestImplementation 'androidx.test:rules:1.5.0' - androidTestUtil 'androidx.test:orchestrator:1.4.2' -} - -tasks.withType(Test).configureEach { - testLogging { - exceptionFormat 'full' - } - afterTest { desc, result -> - println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}" - } -} - -// The following code disables Google Services when building for F-Droid -if (System.getenv('IS_GOOGLE_BUILD') == null) { - android.applicationVariants.configureEach { variant -> - if (variant.flavorName == 'foss') { - project.tasks.names.findAll { it.contains("Google") } - .forEach { taskName -> - project.tasks.named(taskName).configure { - enabled = false - } - } - - project.tasks.names.findAll { it.contains("Bugsnag") } - .forEach { taskName -> - project.tasks.named(taskName).configure { - enabled = false - } - } - } - } -} \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 000000000..985898f74 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,245 @@ +import org.gradle.api.tasks.testing.logging.TestExceptionFormat + +val isGoogleBuild: Boolean = System.getenv("IS_GOOGLE_BUILD")?.isNotBlank() == true +val isReleaseBuild: Boolean = System.getenv("IS_RELEASE_BUILD")?.isNotBlank() == true + +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine" + + defaultConfig { + // versionCode and versionName must be hardcoded to support F-droid + versionCode = 1706001 + versionName = "17.6.0" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + multiDexEnabled = true + vectorDrawables.useSupportLibrary = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + testInstrumentationRunnerArguments["clearPackageData"] = "true" + } + + signingConfigs { + create("release") { + if (isReleaseBuild) { + storeFile = file("../keystore") + keyAlias = System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS") + storePassword = System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD") + keyPassword = System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD") + } + } + } + + buildTypes { + getByName("debug") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + } + + getByName("release") { + isMinifyEnabled = true + isShrinkResources = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + signingConfig = signingConfigs.getByName("release") + } + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + animationsDisabled = true + } + } + + buildFeatures { + buildConfig = true + viewBinding = true + } + + flavorDimensions.add("version") + productFlavors { + create("google") { + dimension = "version" + applicationId = "dev.lucasnlm.antimine" + versionNameSuffix = " S" + + if (isGoogleBuild) { + plugins.apply("com.google.gms.google-services") + plugins.apply("com.bugsnag.android.gradle") + } + } + + create("googleInstant") { + versionCode = 163 + dimension = "version" + applicationId = "dev.lucasnlm.antimine" + versionNameSuffix = " I" + + if (isGoogleBuild) { + plugins.apply("com.google.gms.google-services") + } + } + + create("foss") { + dimension = "version" + // There"s a typo on F-Droid release :( + applicationId = "dev.lucanlm.antimine" + versionNameSuffix = " F" + } + } + + lint { + lintConfig = file("$rootDir/lint.xml") + } +} + +val googleImplementation by configurations +val googleInstantImplementation by configurations +val fossImplementation by configurations + +dependencies { + implementation(project(":external")) + implementation(project(":common")) + implementation(project(":control")) + implementation(project(":about")) + implementation(project(":ui")) + implementation(project(":utils")) + implementation(project(":preferences")) + implementation(project(":themes")) + implementation(project(":tutorial")) + implementation(project(":core")) + implementation(project(":gdx")) + + googleImplementation(project(":proprietary")) + googleInstantImplementation(project(":proprietary")) + googleInstantImplementation(project(":instant")) + fossImplementation(project(":foss")) + fossImplementation(project(":donation")) + + googleImplementation(project(":audio")) + fossImplementation(project(":audio")) + googleInstantImplementation(project(":audio-low")) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.preference.ktx) + implementation(libs.recyclerview) + implementation(libs.multidex) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + implementation(libs.lifecycle.runtime.ktx) + implementation(libs.lifecycle.livedata.ktx) + implementation(libs.lifecycle.common.java8) + + // Constraint + implementation(libs.constraintlayout) + + // Google + implementation(libs.material) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Kotlin + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlin.stdlib) + testImplementation(libs.kotlinx.coroutines.test) + + // Konfetti + implementation(libs.konfetti.xml) + + // Tests + testImplementation(libs.junit) + testImplementation(libs.core.ktx) + testImplementation(libs.test.core.ktx) + testImplementation(libs.rules) + testImplementation(libs.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.fragment.testing) + testImplementation(libs.robolectric) + testImplementation(libs.ext.junit) + testImplementation(libs.mockk) + + // Core library + androidTestImplementation(libs.test.core) + + // AndroidJUnitRunner and JUnit Rules + androidTestImplementation(libs.test.core) + androidTestImplementation(libs.test.core.ktx) + androidTestImplementation(libs.espresso.core) + androidTestImplementation(libs.runner) + androidTestImplementation(libs.rules) + androidTestUtil(libs.orchestrator) +} + +tasks.withType().configureEach { + testLogging { + exceptionFormat = TestExceptionFormat.FULL + } + + addTestListener( + object : TestListener { + override fun beforeTest(desc: TestDescriptor?) = Unit + + override fun beforeSuite(desc: TestDescriptor?) = Unit + + override fun afterSuite( + desc: TestDescriptor, + result: TestResult, + ) = Unit + + override fun afterTest( + desc: TestDescriptor, + result: TestResult, + ) { + println("Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}") + } + }, + ) +} + +// The following code disables Google Services when building for F-Droid +if (!isGoogleBuild) { + android.applicationVariants.configureEach { + if (flavorName == "foss") { + project + .tasks + .names + .map { name -> + name.lowercase() to project.tasks.named(name) + } + .filter { (name, _) -> + name.contains("google") || name.contains("bugsnag") + } + .forEach { (_, task) -> + task.configure { + enabled = false + } + } + } + } +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 8561fbbdd..485711dbb 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -81,3 +81,7 @@ -dontwarn javax.annotation.processing.AbstractProcessor -dontwarn javax.annotation.processing.SupportedOptions +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string + diff --git a/audio-low/build.gradle b/audio-low/build.gradle deleted file mode 100644 index fe925d1c8..000000000 --- a/audio-low/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -plugins { - id 'com.android.library' - id 'org.jetbrains.kotlin.android' -} - -android { - namespace 'dev.lucasnlm.antimine.audio' - - defaultConfig { - minSdk 21 - compileSdk 34 - targetSdk 34 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - -} - -dependencies {} \ No newline at end of file diff --git a/audio-low/build.gradle.kts b/audio-low/build.gradle.kts new file mode 100644 index 000000000..b8d880e12 --- /dev/null +++ b/audio-low/build.gradle.kts @@ -0,0 +1,34 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.audio" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} diff --git a/audio-low/proguard-rules.pro b/audio-low/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/audio-low/proguard-rules.pro +++ b/audio-low/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/audio/build.gradle b/audio/build.gradle deleted file mode 100644 index 28f89f15e..000000000 --- a/audio/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -plugins { - id 'com.android.library' - id 'org.jetbrains.kotlin.android' -} - -android { - namespace 'dev.lucasnlm.antimine.audio' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - -} - -dependencies {} \ No newline at end of file diff --git a/audio/build.gradle.kts b/audio/build.gradle.kts new file mode 100644 index 000000000..b8d880e12 --- /dev/null +++ b/audio/build.gradle.kts @@ -0,0 +1,34 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.audio" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} diff --git a/audio/proguard-rules.pro b/audio/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/audio/proguard-rules.pro +++ b/audio/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 66fdd8dae..000000000 --- a/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -buildscript { - dependencies { - classpath 'com.bugsnag:bugsnag-android-gradle-plugin:8.1.0' - } -} - -plugins { - id 'com.android.application' version '8.1.3' apply false - id 'com.android.library' version '8.1.3' apply false - id 'org.jetbrains.kotlin.android' version '1.9.10' apply false - - id 'com.google.gms.google-services' version '4.4.0' apply false -} - -allprojects { - repositories { - mavenCentral() - google() - } -} - -tasks.register('clean', Delete) { - delete rootProject.buildDir -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..090b53cdc --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,24 @@ +buildscript { + dependencies { + if (System.getenv("IS_GOOGLE_BUILD") == "1") { + classpath("com.bugsnag:bugsnag-android-gradle-plugin:8.1.0") + } + } +} + +plugins { + alias(libs.plugins.android) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.kotlin.android) apply false + + if (System.getenv("IS_GOOGLE_BUILD")?.isNotBlank() == true) { + alias(libs.plugins.google.services) apply false + } +} + +allprojects { + repositories { + mavenCentral() + google() + } +} diff --git a/common/build.gradle b/common/build.gradle deleted file mode 100644 index 93bd63d4a..000000000 --- a/common/build.gradle +++ /dev/null @@ -1,96 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.common' - - defaultConfig { - // versionCode and versionName must be hardcoded to support F-droid - minSdk 21 - targetSdk 34 - compileSdk 34 - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() - } - - buildFeatures { - buildConfig true - viewBinding true - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation project(':core') - implementation project(':external') - implementation project(':i18n') - implementation project(':preferences') - implementation project(':ui') - implementation project(':utils') - implementation project(':gdx') - implementation project(':sgtatham') - implementation project(':control') - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.preference:preference-ktx:1.2.1' - implementation 'androidx.recyclerview:recyclerview:1.3.2' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Kotlin Lib - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' - - // Core library - androidTestImplementation 'androidx.test:core:1.5.0' - - // AndroidJUnitRunner and JUnit Rules - androidTestImplementation 'androidx.test:runner:1.5.2' - androidTestImplementation 'androidx.test:rules:1.5.0' - androidTestUtil 'androidx.test:orchestrator:1.4.2' -} - -tasks.withType(Test).configureEach { - testLogging { - exceptionFormat "full" - } - afterTest { desc, result -> - println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}" - } -} diff --git a/common/build.gradle.kts b/common/build.gradle.kts new file mode 100644 index 000000000..b94603d55 --- /dev/null +++ b/common/build.gradle.kts @@ -0,0 +1,90 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.common" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":external")) + implementation(project(":i18n")) + implementation(project(":preferences")) + implementation(project(":ui")) + implementation(project(":utils")) + implementation(project(":gdx")) + implementation(project(":sgtatham")) + implementation(project(":control")) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.preference.ktx) + implementation(libs.recyclerview) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // Google + implementation(libs.material) + + // Constraint + implementation(libs.constraintlayout) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Coroutines + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + + // Kotlin Lib + implementation(libs.kotlin.stdlib) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) + + // Core library + androidTestImplementation(libs.test.core) + + // AndroidJUnitRunner and JUnit Rules + androidTestImplementation(libs.runner) + androidTestImplementation(libs.rules) + androidTestUtil(libs.orchestrator) +} diff --git a/common/proguard-rules.pro b/common/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/common/proguard-rules.pro +++ b/common/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/control/build.gradle b/control/build.gradle deleted file mode 100644 index 124c19e0a..000000000 --- a/control/build.gradle +++ /dev/null @@ -1,78 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.control' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - buildFeatures { - viewBinding true - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':core') - implementation project(':i18n') - implementation project(':preferences') - implementation project(':ui') - implementation project(':utils') - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // RecyclerView - implementation 'androidx.recyclerview:recyclerview:1.3.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Kotlin Lib - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' -} \ No newline at end of file diff --git a/control/build.gradle.kts b/control/build.gradle.kts new file mode 100644 index 000000000..6766b7755 --- /dev/null +++ b/control/build.gradle.kts @@ -0,0 +1,80 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.control" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":i18n")) + implementation(project(":preferences")) + implementation(project(":ui")) + implementation(project(":utils")) + + // Google + implementation(libs.material) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // RecyclerView + implementation(libs.recyclerview) + + // Constraint + implementation(libs.constraintlayout) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Coroutines + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + + // Kotlin Lib + implementation(libs.kotlin.stdlib) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) +} diff --git a/control/proguard-rules.pro b/control/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/control/proguard-rules.pro +++ b/control/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/core/build.gradle b/core/build.gradle deleted file mode 100644 index 26f572587..000000000 --- a/core/build.gradle +++ /dev/null @@ -1,54 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.core' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':preferences') - implementation project(':utils') - - // Kotlin - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-common-java8:2.6.2' -} \ No newline at end of file diff --git a/core/build.gradle.kts b/core/build.gradle.kts new file mode 100644 index 000000000..d8962544e --- /dev/null +++ b/core/build.gradle.kts @@ -0,0 +1,60 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.core" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":preferences")) + implementation(project(":utils")) + + // Kotlin + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlin.stdlib) + testImplementation(libs.kotlinx.coroutines.test) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // AndroidX + implementation(libs.appcompat) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + implementation(libs.lifecycle.runtime.ktx) + implementation(libs.lifecycle.livedata.ktx) + implementation(libs.lifecycle.common.java8) +} diff --git a/core/proguard-rules.pro b/core/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/core/proguard-rules.pro +++ b/core/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/donation/build.gradle b/donation/build.gradle deleted file mode 100644 index 923a56c04..000000000 --- a/donation/build.gradle +++ /dev/null @@ -1,79 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.donation' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - buildFeatures { - viewBinding true - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':core') - implementation project(':external') - implementation project(':i18n') - implementation project(':preferences') - implementation project(':ui') - implementation project(':utils') - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // RecyclerView - implementation 'androidx.recyclerview:recyclerview:1.3.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Kotlin Lib - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' -} \ No newline at end of file diff --git a/donation/build.gradle.kts b/donation/build.gradle.kts new file mode 100644 index 000000000..533e16852 --- /dev/null +++ b/donation/build.gradle.kts @@ -0,0 +1,81 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.donation" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":external")) + implementation(project(":i18n")) + implementation(project(":preferences")) + implementation(project(":ui")) + implementation(project(":utils")) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // Google + implementation(libs.material) + + // RecyclerView + implementation(libs.recyclerview) + + // Constraint + implementation(libs.constraintlayout) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Coroutines + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + + // Kotlin Lib + implementation(libs.kotlin.stdlib) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) +} diff --git a/donation/proguard-rules.pro b/donation/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/donation/proguard-rules.pro +++ b/donation/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/external/build.gradle b/external/build.gradle deleted file mode 100644 index 5448b013b..000000000 --- a/external/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.external' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':core') - implementation project(':utils') - - // Kotlin - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' -} \ No newline at end of file diff --git a/external/build.gradle.kts b/external/build.gradle.kts new file mode 100644 index 000000000..fd8f63852 --- /dev/null +++ b/external/build.gradle.kts @@ -0,0 +1,47 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.external" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":utils")) + + // Kotlin + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlin.stdlib) + testImplementation(libs.kotlinx.coroutines.test) +} diff --git a/foss/build.gradle b/foss/build.gradle deleted file mode 100644 index 1b4843d31..000000000 --- a/foss/build.gradle +++ /dev/null @@ -1,54 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.foss' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - buildFeatures { - buildConfig true - viewBinding true - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation project(':external') - implementation project(':i18n') - - // Kotlin - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Acra - implementation 'ch.acra:acra-core:5.11.2' - implementation 'ch.acra:acra-mail:5.11.2' - implementation 'ch.acra:acra-toast:5.11.2' - implementation 'ch.acra:acra-limiter:5.11.2' -} diff --git a/foss/build.gradle.kts b/foss/build.gradle.kts new file mode 100644 index 000000000..1a2a9fa24 --- /dev/null +++ b/foss/build.gradle.kts @@ -0,0 +1,57 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.foss" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":external")) + implementation(project(":i18n")) + + // Kotlin + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlin.stdlib) + testImplementation(libs.kotlinx.coroutines.test) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Acra + implementation(libs.acra.core) + implementation(libs.acra.mail) + implementation(libs.acra.toast) + implementation(libs.acra.limiter) +} diff --git a/foss/proguard-rules.pro b/foss/proguard-rules.pro index f1b424510..fcc08df98 100644 --- a/foss/proguard-rules.pro +++ b/foss/proguard-rules.pro @@ -1,21 +1,2 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/gdx/build.gradle b/gdx/build.gradle deleted file mode 100644 index c21e84061..000000000 --- a/gdx/build.gradle +++ /dev/null @@ -1,91 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.gdx' - - defaultConfig { - // versionCode and versionName must be hardcoded to support F-droid - minSdk 21 - targetSdk 34 - compileSdk 34 - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - buildFeatures { - buildConfig true - viewBinding true - } - - sourceSets { - main { - jniLibs.srcDirs = ['libs'] - } - } -} - -configurations { natives } - -dependencies { - implementation project(':core') - implementation project(':preferences') - implementation project(':ui') - implementation project(':utils') - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // LibGDX - api 'com.badlogicgames.gdx:gdx-backend-android:1.11.0' - api 'com.badlogicgames.gdx:gdx:1.11.0' - natives 'com.badlogicgames.gdx:gdx-platform:1.11.0:natives-armeabi-v7a' - natives 'com.badlogicgames.gdx:gdx-platform:1.11.0:natives-arm64-v8a' - natives 'com.badlogicgames.gdx:gdx-platform:1.11.0:natives-x86' - natives 'com.badlogicgames.gdx:gdx-platform:1.11.0:natives-x86_64' -} - -tasks.register('copyAndroidNatives') { - doFirst { - file("libs/armeabi-v7a/").mkdirs() - file("libs/arm64-v8a/").mkdirs() - file("libs/x86_64/").mkdirs() - file("libs/x86/").mkdirs() - - configurations.natives.files.each { jar -> - def outputDir = null - if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") - if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") - if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") - if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") - if (outputDir != null) { - copy { - from zipTree(jar) - into outputDir - include "*.so" - } - } - } - } -} - -preBuild.dependsOn copyAndroidNatives diff --git a/gdx/build.gradle.kts b/gdx/build.gradle.kts new file mode 100644 index 000000000..ac2f93d2e --- /dev/null +++ b/gdx/build.gradle.kts @@ -0,0 +1,102 @@ +import com.android.build.gradle.internal.tasks.factory.dependsOn + +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.gdx" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } + + sourceSets { + named("main") { + jniLibs.srcDir("libs") + } + } +} + +val natives = configurations.create("natives") + +dependencies { + implementation(project(":core")) + implementation(project(":preferences")) + implementation(project(":ui")) + implementation(project(":utils")) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // LibGDX + val gdxVersion = libs.versions.gdx.get() + api(libs.libgdx.backend.android) + api(libs.libgdx) + natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a") + natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a") + natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86") + natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64") +} + +tasks.register("copyAndroidNatives") { + doFirst { + file("libs/armeabi-v7a/").mkdirs() + file("libs/arm64-v8a/").mkdirs() + file("libs/x86_64/").mkdirs() + file("libs/x86/").mkdirs() + + natives.files.forEach { jar -> + val outputDir: File? = + when { + jar.name.endsWith("natives-arm64-v8a.jar") -> file("libs/arm64-v8a") + jar.name.endsWith("natives-armeabi-v7a.jar") -> file("libs/armeabi-v7a") + jar.name.endsWith("natives-x86_64.jar") -> file("libs/x86_64") + jar.name.endsWith("natives-x86.jar") -> file("libs/x86") + else -> null + } + + if (outputDir != null) { + copy { + from(zipTree(jar)) + into(outputDir) + include("*.so") + } + } + } + } +} + +project.tasks.preBuild.dependsOn("copyAndroidNatives") diff --git a/gdx/check_import.sh b/gdx/check_import.sh index ba94cfbd9..251409fb2 100755 --- a/gdx/check_import.sh +++ b/gdx/check_import.sh @@ -13,7 +13,7 @@ if [ ! -f "$1" ]; then fi # Check if the file contains the string in an unique line -if grep -xq "preBuild.dependsOn copyAndroidNatives" "$1"; then +if grep -xq "project.tasks.preBuild.dependsOn(\"copyAndroidNatives\")" "$1"; then exit 0 else exit 1 diff --git a/gdx/proguard-rules.pro b/gdx/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/gdx/proguard-rules.pro +++ b/gdx/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/gradle.properties b/gradle.properties index ef67cae03..d848be56d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,6 @@ android.useAndroidX=true android.nonTransitiveRClass=true android.suppressUnsupportedCompileSdk=34 - # Cache org.gradle.caching=true org.gradle.configureondemand=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..c4bf080ed --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,108 @@ +[versions] +minSdk = "21" +targetSdk = "34" +wearTargetSdk = "33" +wearMinSdk = "25" +compileSdk = "34" + +acra = "5.11.2" +activityKtx = "1.8.0" +amplitude = "2.32.1" +appcompat = "1.6.1" +billingKtx = "6.0.1" +bugsnagAndroid = "5.31.2" +constraintlayout = "2.1.4" +coreKtx = "1.12.0" +coreKtxVersion = "1.5.0" +coreSplashscreen = "1.1.0-alpha02" +espressoCore = "3.5.1" +fragmentKtx = "1.6.2" +gdx = "1.11.0" +google-coreKtx = "1.8.1" +junit = "4.13.2" +junitVersion = "1.1.5" +koinAndroid = "3.1.2" +konfettiXml = "2.0.3" +kotlinxCoroutinesCore = "1.7.3" +lifecycleViewmodelKtx = "2.6.2" +material = "1.10.0" +mockitoCore = "4.6.1" +mockitoKotlin = "2.1.0" +mockk = "1.13.5" +multidex = "2.0.1" +okhttp = "4.10.0" +orchestrator = "1.4.2" +playServicesAds = "22.5.0" +playServicesAuth = "20.7.0" +playServicesGames = "23.1.0" +playServicesInstantapps = "18.0.1" +preferenceKtx = "1.2.1" +recyclerview = "1.3.2" +robolectric = "4.5.1" +runner = "1.5.2" + +# Plugins +bugsnag = "8.1.0" +android = "8.1.3" +kotlin = "1.9.10" +googleServices = "4.4.0" +wear = "1.3.0" + +[libraries] +acra-limiter = { module = "ch.acra:acra-limiter", version.ref = "acra" } +acra-toast = { module = "ch.acra:acra-toast", version.ref = "acra" } +acra-mail = { module = "ch.acra:acra-mail", version.ref = "acra" } +acra-core = { module = "ch.acra:acra-core", version.ref = "acra" } +activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" } +amplitude-sdk = { module = "com.amplitude:android-sdk", version.ref = "amplitude" } +appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } +google-billing-ktx = { module = "com.android.billingclient:billing-ktx", version.ref = "billingKtx" } +bugsnag-android = { module = "com.bugsnag:bugsnag-android", version.ref = "bugsnagAndroid" } +constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } +libgdx = { module = "com.badlogicgames.gdx:gdx", version.ref = "gdx" } +libgdx-backend-android = { module = "com.badlogicgames.gdx:gdx-backend-android", version.ref = "gdx" } +kotlinx-coroutines-play-services = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "kotlinxCoroutinesCore" } +okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } +orchestrator = { module = "androidx.test:orchestrator", version.ref = "orchestrator" } +play-core-ktx = { module = "com.google.android.play:core-ktx", version.ref = "google-coreKtx" } +play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "playServicesAds" } +play-services-auth = { module = "com.google.android.gms:play-services-auth", version.ref = "playServicesAuth" } +play-services-games = { module = "com.google.android.gms:play-services-games", version.ref = "playServicesGames" } +play-services-instantapps = { module = "com.google.android.gms:play-services-instantapps", version.ref = "playServicesInstantapps" } +test-core = { module = "androidx.test:core", version.ref = "coreKtxVersion" } +core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } +espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" } +ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" } +fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentKtx" } +fragment-testing = { module = "androidx.fragment:fragment-testing", version.ref = "fragmentKtx" } +junit = { module = "junit:junit", version.ref = "junit" } +koin-android = { module = "io.insert-koin:koin-android", version.ref = "koinAndroid" } +koin-test = { module = "io.insert-koin:koin-test", version.ref = "koinAndroid" } +konfetti-xml = { module = "nl.dionsegijn:konfetti-xml", version.ref = "konfettiXml" } +kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesCore" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" } +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesCore" } +lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "lifecycleViewmodelKtx" } +lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleViewmodelKtx" } +lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleViewmodelKtx" } +lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" } +material = { module = "com.google.android.material:material", version.ref = "material" } +mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" } +mockito-kotlin = { module = "com.nhaarman.mockitokotlin2:mockito-kotlin", version.ref = "mockitoKotlin" } +mockk = { module = "io.mockk:mockk", version.ref = "mockk" } +multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } +preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } +recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } +robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } +rules = { module = "androidx.test:rules", version.ref = "coreKtxVersion" } +runner = { module = "androidx.test:runner", version.ref = "runner" } +test-core-ktx = { module = "androidx.test:core-ktx", version.ref = "coreKtxVersion" } +wear = { module = "androidx.wear:wear", version.ref = "wear" } + +[plugins] +android = { id = "com.android.application", version.ref = "android" } +android-library = { id = "com.android.library", version.ref = "android" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" } diff --git a/i18n/build.gradle b/i18n/build.gradle deleted file mode 100644 index 96bada1a1..000000000 --- a/i18n/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.i18n' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.10.0' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file diff --git a/i18n/build.gradle.kts b/i18n/build.gradle.kts new file mode 100644 index 000000000..01b304e7f --- /dev/null +++ b/i18n/build.gradle.kts @@ -0,0 +1,37 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.i18n" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} diff --git a/i18n/proguard-rules.pro b/i18n/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/i18n/proguard-rules.pro +++ b/i18n/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/instant/build.gradle b/instant/build.gradle deleted file mode 100644 index 58deab4f5..000000000 --- a/instant/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.instant' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation fileTree(dir: 'libs', include: ['*.jar']) -} diff --git a/instant/build.gradle.kts b/instant/build.gradle.kts new file mode 100644 index 000000000..8ef7d504d --- /dev/null +++ b/instant/build.gradle.kts @@ -0,0 +1,34 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.instant" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} diff --git a/instant/proguard-rules.pro b/instant/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/instant/proguard-rules.pro +++ b/instant/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/lint.xml b/lint.xml new file mode 100644 index 000000000..f5ccd7c3b --- /dev/null +++ b/lint.xml @@ -0,0 +1,3 @@ + + + diff --git a/preferences/build.gradle b/preferences/build.gradle deleted file mode 100644 index 94ff60bb6..000000000 --- a/preferences/build.gradle +++ /dev/null @@ -1,45 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.preferences' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.preference:preference-ktx:1.2.1' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' -} \ No newline at end of file diff --git a/preferences/build.gradle.kts b/preferences/build.gradle.kts new file mode 100644 index 000000000..733bafc0e --- /dev/null +++ b/preferences/build.gradle.kts @@ -0,0 +1,49 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.preferences" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + // AndroidX + implementation(libs.appcompat) + implementation(libs.preference.ktx) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) +} diff --git a/preferences/proguard-rules.pro b/preferences/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/preferences/proguard-rules.pro +++ b/preferences/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/proprietary/build.gradle b/proprietary/build.gradle deleted file mode 100644 index 9b0546364..000000000 --- a/proprietary/build.gradle +++ /dev/null @@ -1,65 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.proprietary' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - } - - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - buildFeatures { - buildConfig true - viewBinding true - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation project(':external') - - // Amplitude - implementation 'com.amplitude:android-sdk:2.32.1' - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - - // Bugsnag - implementation 'com.bugsnag:bugsnag-android:5.31.2' - - // Google - implementation 'com.android.billingclient:billing-ktx:6.0.1' - implementation 'com.google.android.gms:play-services-instantapps:18.0.1' - implementation 'com.google.android.gms:play-services-games:23.1.0' - implementation 'com.google.android.gms:play-services-auth:20.7.0' - implementation 'com.google.android.gms:play-services-ads:22.4.0' - implementation 'com.google.android.play:core-ktx:1.8.1' - - // Jetbrains - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.7.3' - - // Kotlin - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' -} diff --git a/proprietary/build.gradle.kts b/proprietary/build.gradle.kts new file mode 100644 index 000000000..0a7d2342e --- /dev/null +++ b/proprietary/build.gradle.kts @@ -0,0 +1,68 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.proprietary" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":external")) + + // Amplitude + implementation(libs.amplitude.sdk) + implementation(libs.okhttp) + + // Bugsnag + implementation(libs.bugsnag.android) + + // Google + implementation(libs.google.billing.ktx) + implementation(libs.play.services.instantapps) + implementation(libs.play.services.games) + implementation(libs.play.services.auth) + implementation(libs.play.services.ads) + implementation(libs.play.core.ktx) + + // Jetbrains + implementation(libs.kotlinx.coroutines.play.services) + + // Kotlin + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlin.stdlib) + testImplementation(libs.kotlinx.coroutines.test) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) +} diff --git a/proprietary/proguard-rules.pro b/proprietary/proguard-rules.pro index a163c348d..9d525a1ce 100644 --- a/proprietary/proguard-rules.pro +++ b/proprietary/proguard-rules.pro @@ -1,24 +1,7 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile # The native PGS library wraps the Java PGS SDK using reflection. -dontobfuscate diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 3d8332e94..000000000 --- a/settings.gradle +++ /dev/null @@ -1,29 +0,0 @@ -pluginManagement { - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -include ':app' -include ':common' -include ':proprietary' -include ':foss' -include ':about' -include ':external' -include ':instant' -include ':i18n' -include ':ui' -include ':preferences' -include ':core' -include ':control' -include ':themes' -include ':gdx' -include ':tutorial' -include ':sgtatham' -include ':donation' -include ':wear' -include ':audio' -include ':audio-low' -include ':utils' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..130f27322 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,31 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include( + ":app", + ":common", + ":proprietary", + ":foss", + ":about", + ":external", + ":instant", + ":i18n", + ":ui", + ":preferences", + ":core", + ":control", + ":themes", + ":gdx", + ":tutorial", + ":sgtatham", + ":donation", + ":wear", + ":audio", + ":audio-low", + ":utils", +) diff --git a/sgtatham/build.gradle b/sgtatham/build.gradle deleted file mode 100644 index 81ee839e2..000000000 --- a/sgtatham/build.gradle +++ /dev/null @@ -1,53 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.sgtatham' - ndkVersion '25.1.8937393' - - externalNativeBuild { - cmake { - version '3.19.0+' - } - } - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - externalNativeBuild { - cmake { - cppFlags "-std=c++20 -Ofast -g0" - } - } - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - externalNativeBuild { - cmake { - path "src/main/cpp/CMakeLists.txt" - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - -} - -dependencies { - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.10.0' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file diff --git a/sgtatham/build.gradle.kts b/sgtatham/build.gradle.kts new file mode 100644 index 000000000..e67738f21 --- /dev/null +++ b/sgtatham/build.gradle.kts @@ -0,0 +1,62 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.sgtatham" + ndkVersion = "25.1.8937393" + + externalNativeBuild { + cmake { + version = "3.19.0+" + } + } + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + + externalNativeBuild { + cmake { + cppFlags("-std=c++20 -Ofast -g0") + } + } + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } + + externalNativeBuild { + cmake { + path("src/main/cpp/CMakeLists.txt") + } + } +} + +dependencies { + implementation(libs.appcompat) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) +} diff --git a/sgtatham/proguard-rules.pro b/sgtatham/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/sgtatham/proguard-rules.pro +++ b/sgtatham/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/themes/build.gradle b/themes/build.gradle deleted file mode 100644 index df7e3e6fe..000000000 --- a/themes/build.gradle +++ /dev/null @@ -1,79 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.themes' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - buildFeatures { - viewBinding true - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':core') - implementation project(':external') - implementation project(':i18n') - implementation project(':preferences') - implementation project(':ui') - implementation project(':utils') - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // RecyclerView - implementation 'androidx.recyclerview:recyclerview:1.3.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Kotlin Lib - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' -} \ No newline at end of file diff --git a/themes/build.gradle.kts b/themes/build.gradle.kts new file mode 100644 index 000000000..58132c381 --- /dev/null +++ b/themes/build.gradle.kts @@ -0,0 +1,81 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.themes" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":external")) + implementation(project(":i18n")) + implementation(project(":preferences")) + implementation(project(":ui")) + implementation(project(":utils")) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // Google + implementation(libs.material) + + // RecyclerView + implementation(libs.recyclerview) + + // Constraint + implementation(libs.constraintlayout) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Coroutines + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + + // Kotlin Lib + implementation(libs.kotlin.stdlib) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) +} diff --git a/themes/proguard-rules.pro b/themes/proguard-rules.pro index 481bb4348..291aca5ad 100644 --- a/themes/proguard-rules.pro +++ b/themes/proguard-rules.pro @@ -1,21 +1,4 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/tutorial/build.gradle b/tutorial/build.gradle deleted file mode 100644 index c7c5d2ea1..000000000 --- a/tutorial/build.gradle +++ /dev/null @@ -1,81 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.tutorial' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - buildFeatures { - viewBinding true - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':core') - implementation project(':external') - implementation project(':i18n') - implementation project(':preferences') - implementation project(':ui') - implementation project(':utils') - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // RecyclerView - implementation 'androidx.recyclerview:recyclerview:1.3.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Kotlin Lib - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' -} \ No newline at end of file diff --git a/tutorial/build.gradle.kts b/tutorial/build.gradle.kts new file mode 100644 index 000000000..2a97064c0 --- /dev/null +++ b/tutorial/build.gradle.kts @@ -0,0 +1,82 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.tutorial" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + + isMinifyEnabled = true + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":external")) + implementation(project(":i18n")) + implementation(project(":preferences")) + implementation(project(":ui")) + implementation(project(":utils")) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // Google + implementation(libs.material) + + // RecyclerView + implementation(libs.recyclerview) + + // Constraint + implementation(libs.constraintlayout) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Coroutines + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + + // Kotlin Lib + implementation(libs.kotlin.stdlib) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) +} diff --git a/tutorial/proguard-rules.pro b/tutorial/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/tutorial/proguard-rules.pro +++ b/tutorial/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/ui/build.gradle b/ui/build.gradle deleted file mode 100644 index 0b3cbdc50..000000000 --- a/ui/build.gradle +++ /dev/null @@ -1,78 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'dev.lucasnlm.antimine.ui' - - defaultConfig { - minSdk 21 - targetSdk 34 - compileSdk 34 - - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - consumerProguardFiles 'consumer-rules.pro' - } - - buildFeatures { - buildConfig true - viewBinding true - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation project(':core') - implementation project(':i18n') - implementation project(':preferences') - implementation project(':utils') - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - - // RecyclerView - implementation 'androidx.recyclerview:recyclerview:1.3.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Kotlin Lib - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - - // Unit Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:4.6.1' - testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' - testImplementation 'io.mockk:mockk:1.13.5' -} \ No newline at end of file diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts new file mode 100644 index 000000000..73985c432 --- /dev/null +++ b/ui/build.gradle.kts @@ -0,0 +1,80 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.ui" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + + isMinifyEnabled = true + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":core")) + implementation(project(":i18n")) + implementation(project(":preferences")) + implementation(project(":utils")) + + // Google + implementation(libs.material) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + + // RecyclerView + implementation(libs.recyclerview) + + // Constraint + implementation(libs.constraintlayout) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Coroutines + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + + // Kotlin Lib + implementation(libs.kotlin.stdlib) + + // Unit Tests + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) +} diff --git a/ui/proguard-rules.pro b/ui/proguard-rules.pro index 481bb4348..697e219de 100644 --- a/ui/proguard-rules.pro +++ b/ui/proguard-rules.pro @@ -1,21 +1,3 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string diff --git a/utils/build.gradle.kts b/utils/build.gradle.kts index 691a54528..e31c20d28 100644 --- a/utils/build.gradle.kts +++ b/utils/build.gradle.kts @@ -1,14 +1,14 @@ plugins { id("com.android.library") - id("org.jetbrains.kotlin.android") + id("kotlin-android") } android { namespace = "dev.lucasnlm.antimine.utils" defaultConfig { - minSdk = 21 - compileSdk = 34 + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") @@ -25,21 +25,26 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true } } dependencies { // Kotlin - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") - implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.10") - testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlin.stdlib) + testImplementation(libs.kotlinx.coroutines.test) // AndroidX - implementation("androidx.appcompat:appcompat:1.6.1") + implementation(libs.appcompat) } diff --git a/wear/build.gradle b/wear/build.gradle deleted file mode 100644 index fff5561d1..000000000 --- a/wear/build.gradle +++ /dev/null @@ -1,148 +0,0 @@ -plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' -} - -android { - namespace 'dev.lucasnlm.antimine.wear' - - defaultConfig { - // versionCode and versionName must be hardcoded to support F-droid - applicationId 'dev.lucasnlm.antimine' - versionCode 1705110 - versionName '17.5.11 W' - minSdk 25 - targetSdk 33 - compileSdk 34 - multiDexEnabled true - vectorDrawables.useSupportLibrary true - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - testInstrumentationRunnerArguments clearPackageData: 'true' - } - - signingConfigs { - release { - if (System.getenv('IS_RELEASE_BUILD')) { - storeFile file('../keystore') - keyAlias System.getenv('BITRISEIO_ANDROID_KEYSTORE_ALIAS') - storePassword System.getenv('BITRISEIO_ANDROID_KEYSTORE_PASSWORD') - keyPassword System.getenv('BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD') - } - } - } - - buildTypes { - debug { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - - release { - minifyEnabled true - shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.release - } - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() - } - - compileOptions { - targetCompatibility = JavaVersion.VERSION_17 - sourceCompatibility = JavaVersion.VERSION_17 - } - - testOptions { - unitTests { - includeAndroidResources true - animationsDisabled true - } - } - - buildFeatures { - buildConfig true - viewBinding true - } -} - -dependencies { - // Dependencies must be hardcoded to support F-droid - - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation project(':external') - implementation project(':common') - implementation project(':control') - implementation project(':ui') - implementation project(':preferences') - implementation project(':core') - implementation project(':gdx') - implementation project(':foss') - implementation project(':utils') - - // Wear OS - implementation 'androidx.wear:wear:1.3.0' - - // AndroidX - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.preference:preference-ktx:1.2.1' - implementation 'androidx.recyclerview:recyclerview:1.3.2' - implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.activity:activity-ktx:1.8.0' - implementation 'androidx.fragment:fragment-ktx:1.6.2' - implementation 'androidx.core:core-splashscreen:1.1.0-alpha02' - - // Lifecycle - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2' - implementation 'androidx.lifecycle:lifecycle-common-java8:2.6.2' - - // Constraint - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Google - implementation 'com.google.android.material:material:1.10.0' - - // Koin - implementation 'io.insert-koin:koin-android:3.1.2' - testImplementation 'io.insert-koin:koin-test:3.1.2' - - // Kotlin - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.10' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' - - // Tests - testImplementation 'junit:junit:4.13.2' - testImplementation 'androidx.core:core-ktx:1.12.0' - testImplementation 'androidx.test:core-ktx:1.5.0' - testImplementation 'androidx.test:rules:1.5.0' - testImplementation 'androidx.test:runner:1.5.2' - testImplementation 'androidx.test.espresso:espresso-core:3.5.1' - testImplementation 'androidx.fragment:fragment-testing:1.6.2' - testImplementation 'org.robolectric:robolectric:4.5.1' - testImplementation 'androidx.test.ext:junit:1.1.5' - testImplementation 'io.mockk:mockk:1.13.5' - - // Core library - androidTestImplementation 'androidx.test:core:1.5.0' - - // AndroidJUnitRunner and JUnit Rules - androidTestImplementation 'androidx.test:core:1.5.0' - androidTestImplementation 'androidx.test:core-ktx:1.5.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - androidTestImplementation 'androidx.test:runner:1.5.2' - androidTestImplementation 'androidx.test:rules:1.5.0' - androidTestUtil 'androidx.test:orchestrator:1.4.2' -} - -tasks.withType(Test).configureEach { - testLogging { - exceptionFormat 'full' - } - afterTest { desc, result -> - println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}" - } -} diff --git a/wear/build.gradle.kts b/wear/build.gradle.kts new file mode 100644 index 000000000..1a17d4ada --- /dev/null +++ b/wear/build.gradle.kts @@ -0,0 +1,175 @@ +import org.gradle.api.tasks.testing.logging.TestExceptionFormat + +val isGoogleBuild: Boolean = System.getenv("IS_GOOGLE_BUILD")?.isNotBlank() == true +val isReleaseBuild: Boolean = System.getenv("IS_RELEASE_BUILD")?.isNotBlank() == true + +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.wear" + + defaultConfig { + applicationId = "dev.lucasnlm.antimine" + versionCode = 1706000 + versionName = "17.6.0 W" + + //noinspection OldTargetApi + targetSdk = libs.versions.wearTargetSdk.get().toInt() + minSdk = libs.versions.wearMinSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + multiDexEnabled = true + + vectorDrawables.useSupportLibrary = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + testInstrumentationRunnerArguments["clearPackageData"] = "true" + } + + signingConfigs { + create("release") { + if (isReleaseBuild) { + storeFile = file("../keystore") + keyAlias = System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS") + storePassword = System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD") + keyPassword = System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD") + } + } + } + + buildTypes { + getByName("release") { + isMinifyEnabled = true + isShrinkResources = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + signingConfig = signingConfigs.getByName("release") + } + + getByName("debug") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android.txt"), + "proguard-rules.pro", + ) + } + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + animationsDisabled = true + } + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} + +dependencies { + implementation(project(":external")) + implementation(project(":common")) + implementation(project(":control")) + implementation(project(":ui")) + implementation(project(":preferences")) + implementation(project(":core")) + implementation(project(":gdx")) + implementation(project(":foss")) + implementation(project(":utils")) + + // Wear OS + implementation(libs.wear) + + // AndroidX + implementation(libs.appcompat) + implementation(libs.preference.ktx) + implementation(libs.recyclerview) + implementation(libs.multidex) + implementation(libs.activity.ktx) + implementation(libs.fragment.ktx) + implementation(libs.core.splashscreen) + + // Lifecycle + implementation(libs.lifecycle.viewmodel.ktx) + implementation(libs.lifecycle.runtime.ktx) + implementation(libs.lifecycle.livedata.ktx) + implementation(libs.lifecycle.common.java8) + + // Constraint + implementation(libs.constraintlayout) + + // Google + implementation(libs.material) + + // Koin + implementation(libs.koin.android) + testImplementation(libs.koin.test) + + // Kotlin + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlin.stdlib) + testImplementation(libs.kotlinx.coroutines.test) + + // Tests + testImplementation(libs.junit) + testImplementation(libs.core.ktx) + testImplementation(libs.test.core.ktx) + testImplementation(libs.rules) + testImplementation(libs.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.fragment.testing) + testImplementation(libs.robolectric) + testImplementation(libs.ext.junit) + testImplementation(libs.mockk) + + // Core library + androidTestImplementation(libs.test.core) + + // AndroidJUnitRunner and JUnit Rules + androidTestImplementation(libs.test.core) + androidTestImplementation(libs.test.core.ktx) + androidTestImplementation(libs.espresso.core) + androidTestImplementation(libs.runner) + androidTestImplementation(libs.rules) + androidTestUtil(libs.orchestrator) +} + +tasks.withType().configureEach { + testLogging { + exceptionFormat = TestExceptionFormat.FULL + } + + addTestListener( + object : TestListener { + override fun beforeTest(desc: TestDescriptor?) = Unit + + override fun beforeSuite(desc: TestDescriptor?) = Unit + + override fun afterSuite( + desc: TestDescriptor, + result: TestResult, + ) = Unit + + override fun afterTest( + desc: TestDescriptor, + result: TestResult, + ) { + println("Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}") + } + }, + ) +} diff --git a/wear/proguard-rules.pro b/wear/proguard-rules.pro index 8561fbbdd..485711dbb 100644 --- a/wear/proguard-rules.pro +++ b/wear/proguard-rules.pro @@ -81,3 +81,7 @@ -dontwarn javax.annotation.processing.AbstractProcessor -dontwarn javax.annotation.processing.SupportedOptions +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.material.R$attr +-dontwarn dev.lucasnlm.antimine.i18n.R$string + diff --git a/wear/src/main/java/dev/lucasnlm/antimine/wear/game/WearGameActivity.kt b/wear/src/main/java/dev/lucasnlm/antimine/wear/game/WearGameActivity.kt index 82a0197e3..38becce12 100644 --- a/wear/src/main/java/dev/lucasnlm/antimine/wear/game/WearGameActivity.kt +++ b/wear/src/main/java/dev/lucasnlm/antimine/wear/game/WearGameActivity.kt @@ -21,7 +21,7 @@ import dev.lucasnlm.antimine.preferences.PreferencesRepositoryImpl import dev.lucasnlm.antimine.preferences.models.Action import dev.lucasnlm.antimine.preferences.models.ControlStyle import dev.lucasnlm.antimine.ui.ext.ThemedActivity -import dev.lucasnlm.antimine.utils.serializableNonSafe +import dev.lucasnlm.antimine.utils.BundleExt.serializableNonSafe import dev.lucasnlm.antimine.wear.databinding.ActivityGameBinding import dev.lucasnlm.antimine.wear.message.GameOverActivity import dev.lucasnlm.antimine.wear.message.VictoryActivity diff --git a/wear/src/main/java/dev/lucasnlm/antimine/wear/main/view/ThemeListAdapter.kt b/wear/src/main/java/dev/lucasnlm/antimine/wear/main/view/ThemeListAdapter.kt index 4276036fc..92a5080ba 100644 --- a/wear/src/main/java/dev/lucasnlm/antimine/wear/main/view/ThemeListAdapter.kt +++ b/wear/src/main/java/dev/lucasnlm/antimine/wear/main/view/ThemeListAdapter.kt @@ -6,8 +6,8 @@ import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import com.google.android.material.color.MaterialColors import dev.lucasnlm.antimine.preferences.PreferencesRepository -import dev.lucasnlm.antimine.ui.ext.toAndroidColor -import dev.lucasnlm.antimine.ui.ext.toInvertedAndroidColor +import dev.lucasnlm.antimine.ui.ext.ColorExt.toAndroidColor +import dev.lucasnlm.antimine.ui.ext.ColorExt.toInvertedAndroidColor import dev.lucasnlm.antimine.ui.model.AppTheme import dev.lucasnlm.antimine.wear.R import dev.lucasnlm.antimine.wear.databinding.ViewThemeBinding