diff --git a/app.versions.toml b/app.versions.toml new file mode 100644 index 0000000..6ab048e --- /dev/null +++ b/app.versions.toml @@ -0,0 +1,3 @@ +[versions] +code = "60" +name = "1.7.0" diff --git a/app/build.gradle b/app/build.gradle index 3bbb7fc..ef26cf7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,14 +13,14 @@ android { } } namespace 'com.github.cvzi.darkmodewallpaper' - ndkVersion '27.0.12077973' defaultConfig { applicationId 'com.github.cvzi.darkmodewallpaper' - minSdk 29 - compileSdk 35 - targetSdk 35 - versionCode 60 - versionName '1.7.0' + minSdk libs.versions.sdk.min.get().toInteger() + compileSdk libs.versions.sdk.compile.get().toInteger() + targetSdk libs.versions.sdk.target.get().toInteger() + versionCode app.versions.code.get().toInteger() + versionName app.versions.name.get() + ndkVersion libs.versions.ndk.get() externalNativeBuild.cmake.cppFlags '-std=c++17' } buildTypes { @@ -42,11 +42,11 @@ android { buildConfig true } compileOptions { - sourceCompatibility 17 - targetCompatibility 17 + sourceCompatibility libs.versions.jvm.get().toInteger() + targetCompatibility libs.versions.jvm.get().toInteger() } kotlinOptions { - jvmTarget = 17 + jvmTarget = libs.versions.jvm.get().toInteger() } externalNativeBuild.cmake.path file('src/main/cpp/CMakeLists.txt') lint { @@ -61,7 +61,5 @@ licenseReport { copyHtmlReportToAssets = true } dependencies { - implementation 'androidx.cardview:cardview:1.0.0' - implementation 'com.google.android.material:material:1.12.0' - implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0' + implementation(libs.bundles.implementation.app) } \ No newline at end of file diff --git a/build.gradle b/build.gradle index d284bd1..0402173 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.5.1' apply false - id 'org.jetbrains.kotlin.android' version '2.0.0' apply false - id 'com.jaredsburrows.license' version '0.9.8' apply false + alias(libs.plugins.android.application) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.license.report) apply false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..b583f7a --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,31 @@ +[versions] +sdk-target= "35" +sdk-compile = "35" +sdk-min = "29" +ndk = "27.0.12077973" +jvm = "17" + +agp = "8.5.1" +kotlin = "2.0.0" +licensereport = "0.9.8" + +cardview = "1.0.0" +material = "1.12.0" +colorPicker = "3.1.0" + +[libraries] +cardview = { group = "androidx.cardview", name = "cardview", version.ref = "cardview" } +color-picker = { module = "com.github.martin-stone:hsv-alpha-color-picker-android", version.ref = "colorPicker" } +material = { module = "com.google.android.material:material", version.ref = "material" } + +[bundles] +implementation-app = [ + "cardview", + "material", + "color-picker"] + + +[plugins] +android-application = { id = "com.android.application", version.ref = "agp" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +license-report = { id = "com.jaredsburrows.license", version.ref = "licensereport" } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index e66bc21..598423a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,6 +12,11 @@ dependencyResolutionManagement { mavenCentral() maven { url 'https://jitpack.io' } } + versionCatalogs { + create("app") { + from(files("app.versions.toml")) + } + } } include ':app' -rootProject.name = "DarkModeLiveWallpaper" \ No newline at end of file +rootProject.name = "DarkModeLiveWallpaper"