diff --git a/.gitignore b/.gitignore index a216b5a..7c7d2a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /.idea -/app/build -/app/release /build +/release /captures .cxx .DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index 51f7952..3ead507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ #### Notes +- Switch to single-project build - Add `currentTime` variable to decrease code repetitions - Rename `CallbackCaller` to `CallbackHandler` - Use correct default values in `ClockContentPreview` diff --git a/_config.yml b/_config.yml index f812c3c..9a65a82 100644 --- a/_config.yml +++ b/_config.yml @@ -11,27 +11,25 @@ defaults: permalink: /privacy-policy/ exclude: - - /app/src/main/res - - /app/src/main/AndroidManifest.xml - - /app/build.gradle.kts - - /gradle - - /metadata/en-US/changelogs - - /metadata/en-US/images/phoneScreenshots/3.png - - /metadata/en-US/images/phoneScreenshots/4.png - - /metadata/en-US/images/sevenInchScreenshots - - /metadata/en-US/images/tenInchScreenshots - - /metadata/en-US/images/featureGraphic.png - - /metadata/en-US/full_description.txt - - /metadata/en-US/short_description.txt - - /metadata/en-US/title.txt - - /metadata/fr-FR - build.gradle.kts - CNAME + - gradle - gradle.properties - gradlew - gradlew.bat - LICENSE + - metadata/en-US/changelogs + - metadata/en-US/images/phoneScreenshots/3.png + - metadata/en-US/images/phoneScreenshots/4.png + - metadata/en-US/images/sevenInchScreenshots + - metadata/en-US/images/tenInchScreenshots + - metadata/en-US/images/featureGraphic.png + - metadata/en-US/full_description.txt + - metadata/en-US/short_description.txt + - metadata/en-US/title.txt + - metadata/fr-FR - settings.gradle.kts + - src optional_front_matter: remove_originals: true diff --git a/app/build.gradle.kts b/app/build.gradle.kts deleted file mode 100644 index 321fbd7..0000000 --- a/app/build.gradle.kts +++ /dev/null @@ -1,60 +0,0 @@ -plugins { - alias(libs.plugins.androidApplication) - alias(libs.plugins.jetbrainsKotlinAndroid) -} - -android { - namespace = "net.leodesouza.blitz" - compileSdk = 34 - - defaultConfig { - applicationId = "net.leodesouza.blitz" - minSdk = 21 - targetSdk = 34 - versionCode = 180 - versionName = "1.8.0" - - base { - archivesName = "${applicationId}_$versionCode" - } - } - - buildTypes { - release { - isMinifyEnabled = true - isShrinkResources = true - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt")) - } - } - - buildFeatures { - compose = true - } - - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get() - } - - androidResources { - generateLocaleConfig = true - } -} - -dependencies { - val composeBom = platform(libs.androidx.compose.bom) - implementation(composeBom) - debugImplementation(composeBom) - - implementation(libs.androidx.activity.compose) - implementation(libs.androidx.compose.foundation) - implementation(libs.androidx.lifecycle.runtime.compose) - implementation(libs.androidx.lifecycle.viewmodel.compose) - implementation(libs.androidx.ui.tooling.preview) - debugImplementation(libs.androidx.ui.tooling) -} - -kotlin { - jvmToolchain { - languageVersion.set(JavaLanguageVersion.of(libs.versions.jdk.get())) - } -} diff --git a/build.gradle.kts b/build.gradle.kts index 9a42e2c..321fbd7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,60 @@ plugins { - alias(libs.plugins.androidApplication) apply false - alias(libs.plugins.jetbrainsKotlinAndroid) apply false + alias(libs.plugins.androidApplication) + alias(libs.plugins.jetbrainsKotlinAndroid) +} + +android { + namespace = "net.leodesouza.blitz" + compileSdk = 34 + + defaultConfig { + applicationId = "net.leodesouza.blitz" + minSdk = 21 + targetSdk = 34 + versionCode = 180 + versionName = "1.8.0" + + base { + archivesName = "${applicationId}_$versionCode" + } + } + + buildTypes { + release { + isMinifyEnabled = true + isShrinkResources = true + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt")) + } + } + + buildFeatures { + compose = true + } + + composeOptions { + kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get() + } + + androidResources { + generateLocaleConfig = true + } +} + +dependencies { + val composeBom = platform(libs.androidx.compose.bom) + implementation(composeBom) + debugImplementation(composeBom) + + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.androidx.ui.tooling.preview) + debugImplementation(libs.androidx.ui.tooling) +} + +kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of(libs.versions.jdk.get())) + } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 0831014..e7fc2c8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -21,4 +21,3 @@ dependencyResolutionManagement { } rootProject.name = "Blitz" -include(":app") diff --git a/app/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml similarity index 100% rename from app/src/main/AndroidManifest.xml rename to src/main/AndroidManifest.xml diff --git a/app/src/main/kotlin/MainActivity.kt b/src/main/kotlin/MainActivity.kt similarity index 100% rename from app/src/main/kotlin/MainActivity.kt rename to src/main/kotlin/MainActivity.kt diff --git a/app/src/main/kotlin/ui/ClockContent.kt b/src/main/kotlin/ui/ClockContent.kt similarity index 100% rename from app/src/main/kotlin/ui/ClockContent.kt rename to src/main/kotlin/ui/ClockContent.kt diff --git a/app/src/main/kotlin/ui/ClockInputs.kt b/src/main/kotlin/ui/ClockInputs.kt similarity index 100% rename from app/src/main/kotlin/ui/ClockInputs.kt rename to src/main/kotlin/ui/ClockInputs.kt diff --git a/app/src/main/kotlin/ui/ClockScreen.kt b/src/main/kotlin/ui/ClockScreen.kt similarity index 100% rename from app/src/main/kotlin/ui/ClockScreen.kt rename to src/main/kotlin/ui/ClockScreen.kt diff --git a/app/src/main/kotlin/ui/ClockViewModel.kt b/src/main/kotlin/ui/ClockViewModel.kt similarity index 100% rename from app/src/main/kotlin/ui/ClockViewModel.kt rename to src/main/kotlin/ui/ClockViewModel.kt diff --git a/app/src/main/kotlin/ui/components/BasicTime.kt b/src/main/kotlin/ui/components/BasicTime.kt similarity index 100% rename from app/src/main/kotlin/ui/components/BasicTime.kt rename to src/main/kotlin/ui/components/BasicTime.kt diff --git a/app/src/main/kotlin/ui/components/LeaningSideHandler.kt b/src/main/kotlin/ui/components/LeaningSideHandler.kt similarity index 100% rename from app/src/main/kotlin/ui/components/LeaningSideHandler.kt rename to src/main/kotlin/ui/components/LeaningSideHandler.kt diff --git a/app/src/main/kotlin/ui/components/OrientationHandler.kt b/src/main/kotlin/ui/components/OrientationHandler.kt similarity index 100% rename from app/src/main/kotlin/ui/components/OrientationHandler.kt rename to src/main/kotlin/ui/components/OrientationHandler.kt diff --git a/app/src/main/kotlin/ui/models/ClockState.kt b/src/main/kotlin/ui/models/ClockState.kt similarity index 100% rename from app/src/main/kotlin/ui/models/ClockState.kt rename to src/main/kotlin/ui/models/ClockState.kt diff --git a/app/src/main/kotlin/ui/models/PlayerState.kt b/src/main/kotlin/ui/models/PlayerState.kt similarity index 100% rename from app/src/main/kotlin/ui/models/PlayerState.kt rename to src/main/kotlin/ui/models/PlayerState.kt diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/src/main/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from app/src/main/res/drawable/ic_launcher_foreground.xml rename to src/main/res/drawable/ic_launcher_foreground.xml diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/src/main/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher.webp rename to src/main/res/mipmap-hdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/src/main/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher.webp rename to src/main/res/mipmap-mdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/src/main/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher.webp rename to src/main/res/mipmap-xhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/src/main/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher.webp rename to src/main/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/src/main/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp rename to src/main/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/app/src/main/res/resources.properties b/src/main/res/resources.properties similarity index 100% rename from app/src/main/res/resources.properties rename to src/main/res/resources.properties diff --git a/app/src/main/res/values-ar/strings.xml b/src/main/res/values-ar/strings.xml similarity index 100% rename from app/src/main/res/values-ar/strings.xml rename to src/main/res/values-ar/strings.xml diff --git a/app/src/main/res/values/ic_launcher_background.xml b/src/main/res/values/ic_launcher_background.xml similarity index 100% rename from app/src/main/res/values/ic_launcher_background.xml rename to src/main/res/values/ic_launcher_background.xml diff --git a/app/src/main/res/values/strings.xml b/src/main/res/values/strings.xml similarity index 100% rename from app/src/main/res/values/strings.xml rename to src/main/res/values/strings.xml