Skip to content

Commit

Permalink
Ref #4: migrate to .toml version management
Browse files Browse the repository at this point in the history
  • Loading branch information
dkazakov committed Feb 29, 2024
1 parent 0acfd38 commit 1d2d00f
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 16 deletions.
27 changes: 14 additions & 13 deletions mobile/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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)
}
7 changes: 5 additions & 2 deletions mobile/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
}
37 changes: 37 additions & 0 deletions mobile/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }
2 changes: 1 addition & 1 deletion mobile/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ dependencyResolutionManagement {
}
}

rootProject.name = "My Application"
rootProject.name = "Mobile client"
include(":app")

0 comments on commit 1d2d00f

Please sign in to comment.