diff --git a/mobile/app/build.gradle.kts b/mobile/app/build.gradle.kts index 343a1a0..b77cfbb 100644 --- a/mobile/app/build.gradle.kts +++ b/mobile/app/build.gradle.kts @@ -1,16 +1,16 @@ plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) } android { namespace = "io.github.gelassen.manufactory_knowledge_management" - compileSdk = 34 + compileSdk = libs.versions.compileSdkVersion.get().toInt() defaultConfig { applicationId = "io.github.gelassen.manufactory_knowledge_management" - minSdk = 23 - targetSdk = 34 + minSdk = libs.versions.minSdkVersion.get().toInt() + targetSdk = libs.versions.targetSdkVersion.get().toInt() versionCode = 1 versionName = "1.0" @@ -28,17 +28,18 @@ android { targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = libs.versions.jvmTarget.get().toString() } } dependencies { + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.constraintlayout.appcompat) + implementation(libs.android.material) + implementation(libs.androidx.constraintlayout) - implementation("androidx.core:core-ktx:1.10.1") - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("com.google.android.material:material:1.9.0") - implementation("androidx.constraintlayout:constraintlayout:2.1.4") - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + testImplementation(libs.junit) + + androidTestImplementation(libs.androidx.ext.junit) + androidTestImplementation(libs.espresso.core) } \ No newline at end of file diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 53f4a67..85b4e09 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -1,5 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.2.2" apply false - id("org.jetbrains.kotlin.android") version "1.9.22" apply false + alias(libs.plugins.android.application) apply false + alias(libs.plugins.kotlin.android) apply false +// id("com.android.application") version "8.2.2" apply false +// id("org.jetbrains.kotlin.android") version "1.9.22" apply false + alias(libs.plugins.gradleup.static.analysis) version "1.4" } \ No newline at end of file diff --git a/mobile/gradle/libs.versions.toml b/mobile/gradle/libs.versions.toml new file mode 100644 index 0000000..31eac1f --- /dev/null +++ b/mobile/gradle/libs.versions.toml @@ -0,0 +1,37 @@ +[versions] +androidGradlePlugin = "8.2.2" +androidLibrary = "8.2.2" +kotlinAndroid = "1.9.22" # sic! +staticAnalysis = "1.4" +jvmTarget = "1.8" + +minSdkVersion = "23" +targetSdkVersion = "34" +compileSdkVersion = "34" + +coreKtx = "1.10.1" +appCompat = "1.6.1" +androidMaterial = "1.9.0" +constraintlayout = "2.1.4" +junit = "4.13.2" +extJunit = "1.1.5" +espressoCore = "3.5.1" + +[libraries] +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } +androidx-constraintlayout-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appCompat" } +android-material = { group = "com.google.android.material", name = "material", version.ref = "androidMaterial" } +androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } + +junit = { group = "junit", name = "junit", version.ref = "junit" } + +androidx-ext-junit = { group = "androidx.androidx.ext", name = "junit", version.ref = "extJunit" } +espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } + +#stub = { group = "", name = "", version.ref = "" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } +android-library = { id = "com.android.library", version.ref = "androidLibrary" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinAndroid" } +gradleup-static-analysis = { id = "com.gradleup.static-analysis", version.ref = "staticAnalysis" } \ No newline at end of file diff --git a/mobile/settings.gradle.kts b/mobile/settings.gradle.kts index 579fe75..b8cd41e 100644 --- a/mobile/settings.gradle.kts +++ b/mobile/settings.gradle.kts @@ -13,5 +13,5 @@ dependencyResolutionManagement { } } -rootProject.name = "My Application" +rootProject.name = "Mobile client" include(":app")