Replace deprecated methods

pull/667/head
Simon Marquis 2 years ago
parent c8b776658a
commit 1921c6544d

@ -47,7 +47,7 @@ android {
missingDimensionStrategy(FlavorDimension.contentType.name, NiaFlavor.demo.name) missingDimensionStrategy(FlavorDimension.contentType.name, NiaFlavor.demo.name)
} }
packagingOptions { packaging {
resources { resources {
excludes.add("/META-INF/{AL2.0,LGPL2.1}") excludes.add("/META-INF/{AL2.0,LGPL2.1}")
} }

@ -65,7 +65,7 @@ android {
} }
} }
packagingOptions { packaging {
resources { resources {
excludes.add("/META-INF/{AL2.0,LGPL2.1}") excludes.add("/META-INF/{AL2.0,LGPL2.1}")
} }

@ -20,7 +20,6 @@ import com.android.build.api.dsl.CommonExtension
import com.android.build.api.dsl.ManagedVirtualDevice import com.android.build.api.dsl.ManagedVirtualDevice
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.invoke import org.gradle.kotlin.dsl.invoke
import java.util.Locale
/** /**
* Configure project for Gradle managed devices * Configure project for Gradle managed devices
@ -55,7 +54,7 @@ private data class DeviceConfig(
val systemImageSource: String, val systemImageSource: String,
) { ) {
val taskName = buildString { val taskName = buildString {
append(device.toLowerCase(Locale.ROOT).replace(" ", "")) append(device.lowercase().replace(" ", ""))
append("api") append("api")
append(apiLevel.toString()) append(apiLevel.toString())
append(systemImageSource.replace("-", "")) append(systemImageSource.replace("-", ""))

@ -27,6 +27,7 @@ import org.gradle.kotlin.dsl.withType
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
import org.gradle.testing.jacoco.plugins.JacocoTaskExtension import org.gradle.testing.jacoco.plugins.JacocoTaskExtension
import org.gradle.testing.jacoco.tasks.JacocoReport import org.gradle.testing.jacoco.tasks.JacocoReport
import java.util.Locale
private val coverageExclusions = listOf( private val coverageExclusions = listOf(
// Android // Android
@ -36,6 +37,10 @@ private val coverageExclusions = listOf(
"**/Manifest*.*" "**/Manifest*.*"
) )
private fun String.capitalize() = replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString()
}
internal fun Project.configureJacoco( internal fun Project.configureJacoco(
androidComponentsExtension: AndroidComponentsExtension<*, *, *>, androidComponentsExtension: AndroidComponentsExtension<*, *, *>,
) { ) {

Loading…
Cancel
Save