migrate to global kts plugin

This commit is contained in:
Milos Kozak 2023-10-20 10:49:54 +02:00
parent 741f3a9202
commit 9bd4a06b18
46 changed files with 458 additions and 189 deletions

View file

@ -9,10 +9,9 @@ plugins {
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("android-app-dependencies")
id("jacoco-app-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
repositories {
mavenCentral()
google()

View file

@ -5,10 +5,7 @@ object Libs {
const val kotlin = "1.9.10"
const val platformBom = "org.jetbrains.kotlin:kotlin-bom"
const val stdlibJdk8 = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin"
const val test = "org.jetbrains.kotlin:kotlin-test:$kotlin"
const val testJunit5 = "org.jetbrains.kotlin:kotlin-test-junit5"
const val reflect = "org.jetbrains.kotlin:kotlin-reflect:$kotlin"
}

View file

@ -14,4 +14,5 @@ object Versions {
const val wearTargetSdk = 29
val javaVersion = JavaVersion.VERSION_11
const val jacoco = "0.8.11"
}

View file

@ -0,0 +1,207 @@
import groovy.xml.XmlSlurper
import groovy.xml.slurpersupport.NodeChild
import java.io.File
import java.util.Locale
import org.gradle.api.GradleException
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.extra
import org.gradle.kotlin.dsl.register
import org.gradle.testing.jacoco.tasks.JacocoReport
import kotlin.math.roundToInt
plugins {
id("com.android.application")
id("jacoco")
}
private val limits = mutableMapOf(
"instruction" to 0.0,
"branch" to 0.0,
"line" to 0.0,
"complexity" to 0.0,
"method" to 0.0,
"class" to 0.0
)
extra.set("limits", limits)
dependencies {
"implementation"("org.jacoco:org.jacoco.core:${Versions.jacoco}")
}
project.afterEvaluate {
val buildTypes = android.buildTypes.map { type -> type.name }
var productFlavors = android.productFlavors.map { flavor -> flavor.name }
if (productFlavors.isEmpty()) {
productFlavors = productFlavors + ""
}
productFlavors.forEach { flavorName ->
buildTypes.forEach { buildTypeName ->
val sourceName: String
val sourcePath: String
if (flavorName.isEmpty()) {
sourceName = buildTypeName
sourcePath = buildTypeName
} else {
sourceName = "${flavorName}${buildTypeName.replaceFirstChar(Char::titlecase)}"
sourcePath = "${flavorName}/${buildTypeName}"
}
val testTaskName = "test${sourceName.replaceFirstChar(Char::titlecase)}UnitTest"
//println("Task -> $testTaskName")
registerCodeCoverageTask(
testTaskName = testTaskName,
sourceName = sourceName,
sourcePath = sourcePath,
flavorName = flavorName,
buildTypeName = buildTypeName
)
}
}
}
val excludedFiles = mutableSetOf(
// data binding
"android/databinding/**/*.class",
"**/android/databinding/*Binding.class",
"**/android/databinding/*",
"**/androidx/databinding/*",
"**/BR.*",
// android
"**/R.class",
"**/R$*.class",
"**/BuildConfig.*",
"**/Manifest*.*",
"**/*Test*.*",
"android/**/*.*",
// kotlin
"**/*MapperImpl*.*",
"**/*\$ViewInjector*.*",
"**/*\$ViewBinder*.*",
"**/BuildConfig.*",
"**/*Component*.*",
"**/*BR*.*",
"**/Manifest*.*",
"**/*\$Lambda\$*.*",
"**/*Companion*.*",
"**/*Module*.*",
"**/*Dagger*.*",
"**/*Hilt*.*",
"**/*MembersInjector*.*",
"**/*_MembersInjector.class",
"**/*_Factory*.*",
"**/*_Provide*Factory*.*",
"**/*Extensions*.*",
// sealed and data classes
"**/*\$Result.*",
"**/*\$Result\$*.*",
// adapters generated by moshi
"**/*JsonAdapter.*"
)
fun Project.registerCodeCoverageTask(
testTaskName: String,
sourceName: String,
sourcePath: String,
flavorName: String,
buildTypeName: String
) {
tasks.register<JacocoReport>("${testTaskName}Coverage") {
dependsOn(testTaskName)
group = "Reporting"
description = "Generate Jacoco coverage reports on the ${sourceName.replaceFirstChar(Char::titlecase)} build."
val javaDirectories = fileTree(
"${project.buildDir}/intermediates/classes/${sourcePath}"
) { exclude(excludedFiles) }
val kotlinDirectories = fileTree(
"${project.buildDir}/tmp/kotlin-classes/${sourcePath}"
) { exclude(excludedFiles) }
val coverageSrcDirectories = listOf(
"src/main/java",
"src/main/kotlin",
"src/$flavorName/java",
"src/$flavorName/kotlin",
"src/$buildTypeName/java",
"src/$buildTypeName/kotlin"
)
classDirectories.setFrom(files(javaDirectories, kotlinDirectories))
additionalClassDirs.setFrom(files(coverageSrcDirectories))
sourceDirectories.setFrom(files(coverageSrcDirectories))
executionData.setFrom(
files("${project.buildDir}/jacoco/${testTaskName}.exec")
)
reports {
xml.required.set(true)
html.required.set(true)
}
doLast {
jacocoTestReport("${testTaskName}Coverage")
}
}
}
@Suppress("UNCHECKED_CAST")
fun Project.jacocoTestReport(testTaskName: String) {
val reportsDirectory = jacoco.reportsDirectory.asFile.get()
val report = file("$reportsDirectory/${testTaskName}/${testTaskName}.xml")
logger.lifecycle("Checking coverage results: $report")
val metrics = report.extractTestsCoveredByType()
val limits = project.extra["limits"] as Map<String, Double>
val failures = metrics.filter { entry ->
entry.value < limits[entry.key]!!
}.map { entry ->
"- ${entry.key} coverage rate is: ${entry.value}%, minimum is ${limits[entry.key]}%"
}
if (failures.isNotEmpty()) {
logger.quiet("------------------ Code Coverage Failed -----------------------")
failures.forEach { logger.quiet(it) }
logger.quiet("---------------------------------------------------------------")
throw GradleException("Code coverage failed")
}
logger.quiet("------------------ Code Coverage Success -----------------------")
metrics.forEach { entry ->
logger.quiet("- ${entry.key} coverage rate is: ${entry.value}%")
}
logger.quiet("---------------------------------------------------------------")
}
@Suppress("UNCHECKED_CAST")
fun File.extractTestsCoveredByType(): Map<String, Double> {
val xmlReader = XmlSlurper().apply {
setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false)
setFeature("http://apache.org/xml/features/disallow-doctype-decl", false)
}
val counterNodes: List<NodeChild> = xmlReader
.parse(this).parent()
.children()
.filter {
(it as NodeChild).name() == "counter"
} as List<NodeChild>
return counterNodes.associate { nodeChild ->
val type = nodeChild.attributes()["type"].toString().lowercase(Locale.ENGLISH)
val covered = nodeChild.attributes()["covered"].toString().toDouble()
val missed = nodeChild.attributes()["missed"].toString().toDouble()
val percentage = ((covered / (covered + missed)) * 10000.0).roundToInt() / 100.0
Pair(type, percentage)
}
}

View file

@ -0,0 +1,207 @@
import groovy.xml.XmlSlurper
import groovy.xml.slurpersupport.NodeChild
import java.io.File
import java.util.Locale
import org.gradle.api.GradleException
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.extra
import org.gradle.kotlin.dsl.register
import org.gradle.testing.jacoco.tasks.JacocoReport
import kotlin.math.roundToInt
plugins {
id("com.android.library")
id("jacoco")
}
private val limits = mutableMapOf(
"instruction" to 0.0,
"branch" to 0.0,
"line" to 0.0,
"complexity" to 0.0,
"method" to 0.0,
"class" to 0.0
)
extra.set("limits", limits)
dependencies {
"implementation"("org.jacoco:org.jacoco.core:${Versions.jacoco}")
}
project.afterEvaluate {
val buildTypes = android.buildTypes.map { type -> type.name }
var productFlavors = android.productFlavors.map { flavor -> flavor.name }
if (productFlavors.isEmpty()) {
productFlavors = productFlavors + ""
}
productFlavors.forEach { flavorName ->
buildTypes.forEach { buildTypeName ->
val sourceName: String
val sourcePath: String
if (flavorName.isEmpty()) {
sourceName = buildTypeName
sourcePath = buildTypeName
} else {
sourceName = "${flavorName}${buildTypeName.replaceFirstChar(Char::titlecase)}"
sourcePath = "${flavorName}/${buildTypeName}"
}
val testTaskName = "test${sourceName.replaceFirstChar(Char::titlecase)}UnitTest"
//println("Task -> $testTaskName")
registerCodeCoverageTask(
testTaskName = testTaskName,
sourceName = sourceName,
sourcePath = sourcePath,
flavorName = flavorName,
buildTypeName = buildTypeName
)
}
}
}
val excludedFiles = mutableSetOf(
// data binding
"android/databinding/**/*.class",
"**/android/databinding/*Binding.class",
"**/android/databinding/*",
"**/androidx/databinding/*",
"**/BR.*",
// android
"**/R.class",
"**/R$*.class",
"**/BuildConfig.*",
"**/Manifest*.*",
"**/*Test*.*",
"android/**/*.*",
// kotlin
"**/*MapperImpl*.*",
"**/*\$ViewInjector*.*",
"**/*\$ViewBinder*.*",
"**/BuildConfig.*",
"**/*Component*.*",
"**/*BR*.*",
"**/Manifest*.*",
"**/*\$Lambda\$*.*",
"**/*Companion*.*",
"**/*Module*.*",
"**/*Dagger*.*",
"**/*Hilt*.*",
"**/*MembersInjector*.*",
"**/*_MembersInjector.class",
"**/*_Factory*.*",
"**/*_Provide*Factory*.*",
"**/*Extensions*.*",
// sealed and data classes
"**/*\$Result.*",
"**/*\$Result\$*.*",
// adapters generated by moshi
"**/*JsonAdapter.*"
)
fun Project.registerCodeCoverageTask(
testTaskName: String,
sourceName: String,
sourcePath: String,
flavorName: String,
buildTypeName: String
) {
tasks.register<JacocoReport>("${testTaskName}Coverage") {
dependsOn(testTaskName)
group = "Reporting"
description = "Generate Jacoco coverage reports on the ${sourceName.replaceFirstChar(Char::titlecase)} build."
val javaDirectories = fileTree(
"${project.buildDir}/intermediates/classes/${sourcePath}"
) { exclude(excludedFiles) }
val kotlinDirectories = fileTree(
"${project.buildDir}/tmp/kotlin-classes/${sourcePath}"
) { exclude(excludedFiles) }
val coverageSrcDirectories = listOf(
"src/main/java",
"src/main/kotlin",
"src/$flavorName/java",
"src/$flavorName/kotlin",
"src/$buildTypeName/java",
"src/$buildTypeName/kotlin"
)
classDirectories.setFrom(files(javaDirectories, kotlinDirectories))
additionalClassDirs.setFrom(files(coverageSrcDirectories))
sourceDirectories.setFrom(files(coverageSrcDirectories))
executionData.setFrom(
files("${project.buildDir}/jacoco/${testTaskName}.exec")
)
reports {
xml.required.set(true)
html.required.set(true)
}
doLast {
jacocoTestReport("${testTaskName}Coverage")
}
}
}
@Suppress("UNCHECKED_CAST")
fun Project.jacocoTestReport(testTaskName: String) {
val reportsDirectory = jacoco.reportsDirectory.asFile.get()
val report = file("$reportsDirectory/${testTaskName}/${testTaskName}.xml")
logger.lifecycle("Checking coverage results: $report")
val metrics = report.extractTestsCoveredByType()
val limits = project.extra["limits"] as Map<String, Double>
val failures = metrics.filter { entry ->
entry.value < limits[entry.key]!!
}.map { entry ->
"- ${entry.key} coverage rate is: ${entry.value}%, minimum is ${limits[entry.key]}%"
}
if (failures.isNotEmpty()) {
logger.quiet("------------------ Code Coverage Failed -----------------------")
failures.forEach { logger.quiet(it) }
logger.quiet("---------------------------------------------------------------")
throw GradleException("Code coverage failed")
}
logger.quiet("------------------ Code Coverage Success -----------------------")
metrics.forEach { entry ->
logger.quiet("- ${entry.key} coverage rate is: ${entry.value}%")
}
logger.quiet("---------------------------------------------------------------")
}
@Suppress("UNCHECKED_CAST")
fun File.extractTestsCoveredByType(): Map<String, Double> {
val xmlReader = XmlSlurper().apply {
setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false)
setFeature("http://apache.org/xml/features/disallow-doctype-decl", false)
}
val counterNodes: List<NodeChild> = xmlReader
.parse(this).parent()
.children()
.filter {
(it as NodeChild).name() == "counter"
} as List<NodeChild>
return counterNodes.associate { nodeChild ->
val type = nodeChild.attributes()["type"].toString().lowercase(Locale.ENGLISH)
val covered = nodeChild.attributes()["covered"].toString().toDouble()
val missed = nodeChild.attributes()["missed"].toString().toDouble()
val percentage = ((covered / (covered + missed)) * 10000.0).roundToInt() / 100.0
Pair(type, percentage)
}
}

View file

@ -7,7 +7,7 @@ plugins {
}
dependencies {
testImplementation(Libs.Kotlin.test)
testImplementation(kotlin("test"))
testImplementation(Libs.JUnit.jupiter)
testImplementation(Libs.JUnit.jupiterApi)
testImplementation(Libs.json)

View file

@ -7,7 +7,7 @@ plugins {
}
dependencies {
testImplementation(Libs.Kotlin.test)
testImplementation(kotlin("test"))
testImplementation(Libs.JUnit.jupiter)
testImplementation(Libs.JUnit.jupiterApi)
testImplementation(Libs.json)

View file

@ -6,10 +6,9 @@ plugins {
id("kotlinx-serialization")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.core.interfaces"

View file

@ -6,10 +6,9 @@ plugins {
id("android-module-dependencies")
id("all-open-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.core.main"
}

View file

@ -1,95 +0,0 @@
project.afterEvaluate { project ->
setupAndroidReporting()
}
def setupAndroidReporting() {
tasks.withType(Test) {
// Whether or not classes without source location should be instrumented
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
def buildTypes = ["debug", "fullDebug"]
def productFlavors = android.productFlavors.collect { flavor ->
flavor.name
}
// When no product flavors defined, use empty
if (!productFlavors) productFlavors.add('')
productFlavors.each { productFlavorName ->
buildTypes.each { buildTypeName ->
def sourceName, sourcePath
if (!productFlavorName) {
sourceName = sourcePath = "${buildTypeName}"
} else {
sourceName = "${productFlavorName}${buildTypeName.capitalize()}"
sourcePath = "${productFlavorName}/${buildTypeName}"
}
def testTaskName = "test${sourceName.capitalize()}UnitTest"
// System.out.println("Task -> $testTaskName")
// Create coverage task of form 'testFlavorTypeCoverage' depending on 'testFlavorTypeUnitTest'
task "${testTaskName}Coverage"(type: JacocoReport, dependsOn: "$testTaskName") {
group = "Reporting"
description = "Generate Jacoco coverage reports on the ${sourceName.capitalize()} build."
def fileFilter = [
// data binding
'android/databinding/**/*.class',
'**/android/databinding/*Binding.class',
'**/android/databinding/*',
'**/androidx/databinding/*',
'**/BR.*',
// android
'**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
'**/*Test*.*',
'android/**/*.*',
// kotlin
'**/*MapperImpl*.*',
'**/*$ViewInjector*.*',
'**/*$ViewBinder*.*',
'**/BuildConfig.*',
'**/*Component*.*',
'**/*BR*.*',
'**/Manifest*.*',
'**/*$Lambda$*.*',
'**/*Companion*.*',
'**/*Module*.*',
'**/*Dagger*.*',
'**/*Hilt*.*',
'**/*MembersInjector*.*',
'**/*_MembersInjector.class',
'**/*_Factory*.*',
'**/*_Provide*Factory*.*',
'**/*Extensions*.*',
// sealed and data classes
'**/*$Result.*',
'**/*$Result$*.*',
// adapters generated by moshi
'**/*JsonAdapter.*',
]
def javaTree = fileTree(dir: "${project.buildDir}/intermediates/javac/$sourceName/classes", excludes: fileFilter)
def kotlinTree = fileTree(dir: "${project.buildDir}/tmp/kotlin-classes/$sourceName", excludes: fileFilter)
classDirectories.from = files([javaTree], [kotlinTree])
executionData.from = files("${project.buildDir}/jacoco/${testTaskName}.exec")
def coverageSourceDirs = ["src/main/java",
"src/$productFlavorName/java",
"src/$buildTypeName/java"]
sourceDirectories.setFrom(files(coverageSourceDirs))
additionalSourceDirs.setFrom(files(coverageSourceDirs))
reports {
csv.required = false
xml.required = true
html.required = true
}
}
}
}
}

View file

@ -6,10 +6,9 @@ plugins {
id("android-module-dependencies")
id("all-open-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.core.utils"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.core.validators"
}

View file

@ -5,10 +5,9 @@ plugins {
id("kotlin-allopen")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.database.impl"

View file

@ -5,10 +5,9 @@ plugins {
id("android-module-dependencies")
id("all-open-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.implementation"
}

View file

@ -4,9 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.insight"

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.aps"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.automation"
}

View file

@ -5,10 +5,9 @@ plugins {
id("kotlin-parcelize")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.configuration"
}

View file

@ -5,10 +5,9 @@ plugins {
id("android-module-dependencies")
id("test-module-dependencies")
id("all-open-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.constraints"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.insulin"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.main"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.sensitivity"
}

View file

@ -3,11 +3,9 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.smoothing"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.source"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.sync"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
buildFeatures {

View file

@ -3,11 +3,9 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.pump.combov2"
buildFeatures {

View file

@ -2,11 +2,9 @@ plugins {
id("com.android.library")
id("kotlin-android")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.comboctl"
sourceSets.getByName("main") {
@ -20,14 +18,12 @@ android {
}
dependencies {
implementation(platform(Libs.Kotlin.platformBom))
testImplementation(Libs.Kotlin.test)
testImplementation(Libs.Kotlin.testJunit5)
api(Libs.KotlinX.coroutinesCore)
api(Libs.KotlinX.datetime)
api(Libs.AndroidX.core)
testImplementation(kotlin("test"))
testImplementation(Libs.kotlinTestRunner)
testRuntimeOnly(Libs.JUnit.jupiterEngine)
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.pump.dana"

View file

@ -3,11 +3,9 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.danar"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.pump.danars"
ndkVersion = Versions.ndkVersion

View file

@ -3,11 +3,9 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.pump.diaconn"

View file

@ -3,11 +3,9 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.plugins.pump.eopatch"
buildFeatures {

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.plugins.pump.medtronic"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.pump.medtrum"
buildFeatures {

View file

@ -3,11 +3,9 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.plugins.pump.omnipod.common"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.plugins.pump.omnipod.dash"

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.plugins.pump.omnipod.eros"

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.pump.common"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.androidaps.plugins.pump.common.hw.rileylink"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.pump.virtual"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.shared.impl"
defaultConfig {

View file

@ -2,10 +2,9 @@ plugins {
id("com.android.library")
id("kotlin-android")
id("android-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.shared.tests"
}

View file

@ -4,10 +4,9 @@ plugins {
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.ui"
}

View file

@ -8,10 +8,9 @@ plugins {
id("kotlin-kapt")
id("android-app-dependencies")
id("test-app-dependencies")
id("jacoco-app-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
repositories {
google()
mavenCentral()

View file

@ -3,11 +3,9 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.workflow"
}