android-module-dependecies.kts

This commit is contained in:
Milos Kozak 2023-10-12 13:58:17 +02:00
parent 2c9ce06043
commit dd97492be2
8 changed files with 99 additions and 12 deletions

View file

@ -15,6 +15,8 @@ plugins {
apply(from = "${project.rootDir}/core/main/android_dependencies.gradle") apply(from = "${project.rootDir}/core/main/android_dependencies.gradle")
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle") apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
apply(from = "${project.rootDir}/core/main/test_dependencies.gradle")
repositories { repositories {
mavenCentral() mavenCentral()
@ -75,7 +77,7 @@ fun gitAvailable(): Boolean {
} catch (ignored: Exception) { } catch (ignored: Exception) {
return false // NoGitSystemAvailable return false // NoGitSystemAvailable
} }
return !stringBuilder.toString().isEmpty() return stringBuilder.toString().isNotEmpty()
} }
@ -222,8 +224,6 @@ dependencies {
api(Libs.Rx.rxDogTag) api(Libs.Rx.rxDogTag)
} }
apply(from = "${project.rootDir}/core/main/test_dependencies.gradle")
println("-------------------") println("-------------------")
println("isMaster: ${isMaster()}") println("isMaster: ${isMaster()}")
println("gitAvailable: ${gitAvailable()}") println("gitAvailable: ${gitAvailable()}")

View file

@ -75,7 +75,6 @@ buildscript {
plugins { plugins {
id("org.jlleitschuh.gradle.ktlint") version "11.6.1" id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
id("org.jetbrains.kotlin.android") version Libs.Kotlin.kotlin apply false
} }
allprojects { allprojects {

View file

@ -1,7 +1,22 @@
object KtsBuildVersions {
const val gradle = "8.1.2"
const val kotlin = "1.9.0"
}
plugins { plugins {
`kotlin-dsl` `kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
} }
repositories { repositories {
google()
mavenCentral() mavenCentral()
gradlePluginPortal()
}
dependencies {
implementation("com.android.tools.build:gradle:${KtsBuildVersions.gradle}")
// implementation("com.android.tools.build:gradle-api:${KtsBuildVersions.gradle}")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${KtsBuildVersions.kotlin}")
} }

View file

@ -62,9 +62,6 @@ object Libs {
const val joda = "net.danlew:android.joda:2.12.5" const val joda = "net.danlew:android.joda:2.12.5"
const val androidSvg = "com.caverock:androidsvg:1.4" const val androidSvg = "com.caverock:androidsvg:1.4"
const val rxjava = "3.1.7"
const val rxandroid = "3.0.2"
const val rxkotlin = "3.0.1"
const val room = "2.5.2" const val room = "2.5.2"
const val lifecycle = "2.6.2" const val lifecycle = "2.6.2"
const val coroutines = "1.7.3" const val coroutines = "1.7.3"

View file

@ -1,7 +1,15 @@
import org.gradle.api.JavaVersion
object Versions { object Versions {
const val appVersion = "3.2.0-dev-m" const val appVersion = "3.2.0-dev-m"
const val versionCode = 1500 const val versionCode = 1500
const val ndkVersion = "21.1.6352462" const val ndkVersion = "21.1.6352462"
const val compileSdk = 34
const val minSdk = 28
const val wearMinSdk = 26
val javaVersion = JavaVersion.VERSION_11
} }

View file

@ -0,0 +1,70 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
}
android {
compileSdk = Versions.compileSdk
defaultConfig {
minSdk = 28
@Suppress("DEPRECATION")
targetSdk = 28
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
viewBinding = true
}
buildTypes {
named("release") {
isMinifyEnabled = false
setProguardFiles(listOf(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"))
}
}
sourceSets {
named("main") {
jniLibs.srcDirs(listOf("src/main/jniLibs"))
}
}
compileOptions {
sourceCompatibility = Versions.javaVersion
targetCompatibility = Versions.javaVersion
}
lint {
checkReleaseBuilds = false
disable += "MissingTranslation"
disable += "ExtraTranslation"
}
flavorDimensions.add("standard")
productFlavors {
create("full") {
dimension = "standard"
}
create("pumpcontrol") {
dimension = "standard"
}
create("aapsclient") {
dimension = "standard"
}
create("aapsclient2") {
dimension = "standard"
}
}
// disable for modules here
buildFeatures {
buildConfig = false
}
}
dependencies {
kapt(Libs.Dagger.androidProcessor)
kapt(Libs.Dagger.compiler)
}

View file

@ -2,10 +2,9 @@ plugins {
id("com.android.library") id("com.android.library")
id("kotlin-android") id("kotlin-android")
id("kotlin-kapt") id("kotlin-kapt")
id("android-module-dependencies")
} }
apply(from = "${project.rootDir}/core/main/android_dependencies.gradle")
apply(from = "${project.rootDir}/core/main/android_module_dependencies.gradle")
android { android {

View file

@ -5,10 +5,9 @@ plugins {
id("kotlin-allopen") id("kotlin-allopen")
id("kotlin-parcelize") id("kotlin-parcelize")
id("kotlinx-serialization") id("kotlinx-serialization")
id("android-module-dependencies")
} }
apply(from = "${project.rootDir}/core/main/android_dependencies.gradle")
apply(from = "${project.rootDir}/core/main/android_module_dependencies.gradle")
apply(from = "${project.rootDir}/core/main/allopen_dependencies.gradle") apply(from = "${project.rootDir}/core/main/allopen_dependencies.gradle")
apply(from = "${project.rootDir}/core/main/test_dependencies.gradle") apply(from = "${project.rootDir}/core/main/test_dependencies.gradle")
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle") apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
@ -17,7 +16,7 @@ android {
namespace = "app.aaps.core.interfaces" namespace = "app.aaps.core.interfaces"
defaultConfig { defaultConfig {
minSdk = 26 // for wear minSdk = Versions.wearMinSdk // for wear
} }
} }