diff --git a/app/build.gradle b/app/build.gradle index 7b2a3f751..cbc7d2024 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,4 @@ -plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' -} +apply plugin: 'com.android.application' android { compileSdk 34 @@ -28,17 +25,20 @@ android { targetCompatibility JavaVersion.VERSION_17 } - composeOptions { - kotlinCompilerExtensionVersion = "1.4.2" - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + ext { + APP_NAME = "@string/app_label" + APP_NAME_DEBUG = "@string/app_label_debug" } buildTypes { release { - signingConfig signingConfigs.debug + debuggable false + manifestPlaceholders = [appName: APP_NAME] + } + debug { + manifestPlaceholders = [appName: APP_NAME_DEBUG] + versionNameSuffix "-debug" + applicationIdSuffix ".debug" } archivesBaseName = "NewClock_" + defaultConfig.versionName } @@ -47,33 +47,21 @@ android { buildConfig = true } + dependenciesInfo { + includeInApk = false + includeInBundle = false + } + ndkVersion '26.1.10909125' namespace 'com.best.deskclock' } dependencies { - implementation 'androidx.annotation:annotation:1.7.1' - implementation "androidx.collection:collection:1.4.0" - implementation "androidx.arch.core:core-common:2.2.0" - implementation 'androidx.lifecycle:lifecycle-common:2.7.0' - implementation "androidx.lifecycle:lifecycle-runtime:2.7.0" - implementation "androidx.transition:transition:1.4.1" - implementation "androidx.core:core:1.12.0" - implementation "androidx.legacy:legacy-support-core-ui:1.0.0" - implementation "androidx.media:media:1.7.0" - implementation "androidx.legacy:legacy-support-v13:1.0.0" - implementation "androidx.preference:preference:1.2.1" - implementation "androidx.appcompat:appcompat:1.6.1" implementation "androidx.gridlayout:gridlayout:1.0.0" + implementation "androidx.legacy:legacy-support-v13:1.0.0" implementation "androidx.percentlayout:percentlayout:1.0.0" + implementation "androidx.preference:preference:1.2.1" implementation "androidx.recyclerview:recyclerview:1.3.2" implementation 'com.google.android.material:material:1.11.0' - implementation 'androidx.compose.material3:material3:1.2.0' - implementation 'androidx.compose.material3:material3-window-size-class:1.2.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.loader:loader:1.1.0' - implementation 'androidx.test:core:1.5.0' - implementation 'androidx.test:rules:1.5.0' } diff --git a/app/src/debug/res/values/strings.xml b/app/src/debug/res/values/strings.xml new file mode 100644 index 000000000..4d6094944 --- /dev/null +++ b/app/src/debug/res/values/strings.xml @@ -0,0 +1,11 @@ + + + + + + Clock debug + Settings debug version + Settings debug version + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index eac967827..6760c5834 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -45,7 +45,7 @@ android:fullBackupContent="@xml/backup_scheme" android:fullBackupOnly="true" android:icon="@mipmap/launcher_clock" - android:label="@string/app_label" + android:label="${appName}" android:requiredForAllUsers="true" android:supportsRtl="true" android:theme="@style/Theme.DeskClock.Actionbar" @@ -158,7 +158,7 @@ diff --git a/build.gradle b/build.gradle index f91e20f11..d8b4747b0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,25 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. -plugins { - // Todo : Android Gradle Plugin Version 8.0.1 is set to be used with AndroidStudio 2022.2.1 Patch 1 - // Update to 8.1.4 not 8.2 because 8.2 requires newer Android Studio which is even worse than 2022.x in performance - id 'com.android.application' version '8.0.1' apply false - id 'com.android.library' version '8.0.1' apply false - id 'org.jetbrains.kotlin.android' version '1.9.22' apply false + +buildscript { + repositories { + mavenCentral() + google() + } + dependencies { + classpath 'com.android.tools.build:gradle:8.0.1' + // 8.2 requires newer Android Studio that is even worse than 2022.x in performance + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + mavenCentral() + maven { url "https://jitpack.io" } + } } task clean(type: Delete) { diff --git a/settings.gradle b/settings.gradle index abe2af50f..e7b4def49 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,16 +1 @@ -pluginManagement { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } -} -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - google() - mavenCentral() - } -} -rootProject.name = "DeskClock" include ':app'