-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
85 lines (76 loc) · 3.54 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import org.gradle.util.internal.VersionNumber
buildscript {
ext {
//Ref : https://developer.android.com/build/releases/past-releases
agp_gradle = libs.versions.agp.version.get()
kotlin_version = "1.9.22"
// coroutine
coroutine_version = "1.6.4"
koin_version = libs.versions.koin.version.get()
ktorfit_version = libs.versions.ktorfit.version.get()
//DB : Room
room_version = "2.3.0"
// realm_version = libs.versions.realm.get()
jb_compose_version = libs.versions.compose.version.get()
navigation_version = libs.versions.navigation.version.get() // 2.3.5 <-->androidx.navigation.safeargs 2.4.1<--> androidx.navigation.safeargs.kotlin
compileSdkVersion = 31
compileSdk = compileSdkVersion
targetSdkVersion = compileSdk
targetSdk = targetSdkVersion
minSdkVersion = 21
minSdk = minSdkVersion
}
println "Show kotlin_version : ${kotlin_version}"
def kotlin = ext.get("kotlin.version")
println "Show kotlin_version from gradle.properties : ${kotlin}"
def kotlin_v = libs.versions.kotlin.version.get()
println "Show kotlin_version from lib.version.toml : ${kotlin_v}"
repositories {
gradlePluginPortal()
mavenCentral()
google()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url = uri('https://maven.pkg.jetbrains.space/public/p/compose/dev')
}
}
dependencies {
classpath "com.android.tools.build:gradle:$agp_gradle"
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
// classpath "${libs.plugins.realm.get()}"
classpath "io.realm.kotlin:gradle-plugin:1.13.0"
classpath "de.jensklingenberg.ktorfit:ktorfit-gradle-plugin:${ktorfit_version}"
// classpath "io.github.skeptick.libres:gradle-plugin:1.2.2" //i18n
// classpath 'com.codingfeline.buildkonfig:buildkonfig-gradle-plugin:0.15.1'
}
}
//Ref : https://stackoverflow.com/questions/37555196/in-gradle-how-to-use-a-variable-for-a-plugin-version
plugins {
id 'org.jetbrains.kotlin.android' version "${kotlin_version}" apply false
id "org.jetbrains.kotlin.jvm" version "${kotlin_version}" apply false
//apply plugin: "org.jetbrains.kotlin.jvm"
id "org.jetbrains.kotlin.multiplatform" version "${kotlin_version}" apply false
//apply plugin: "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.kotlin.plugin.serialization" version "${kotlin_version}" apply false
//apply plugin: "org.jetbrains.kotlin.plugin.serialization"
id "org.jetbrains.compose" version "${jb_compose_version}" apply false
alias(libs.plugins.i18n.skeptick.libres) apply false
alias(libs.plugins.buildkonfig) apply false
// id 'io.realm.kotlin' version "${realm_version}" apply false
}
allprojects {
//https://www.baeldung.com/java-comparing-versions
println "Show current define room version : ${room_version}"
def room_version = VersionNumber.parse(room_version)
def target_room_version = VersionNumber.parse("2.4.0-alpha03")
println "Show current define room ver : ${room_version.minor}"
println "Show target_room_version : ${target_room_version.minor}"
println "Show compareTo : ${room_version.compareTo(target_room_version)}"
}
task clean(type: Delete) {
delete rootProject.buildDir
}