|
|
|
|
@ -19,9 +19,11 @@ import com.google.samples.apps.nowinandroid.configureFlavors
|
|
|
|
|
import com.google.samples.apps.nowinandroid.configureGradleManagedDevices
|
|
|
|
|
import com.google.samples.apps.nowinandroid.configureKotlinAndroid
|
|
|
|
|
import com.google.samples.apps.nowinandroid.configureKotlinMultiplatform
|
|
|
|
|
import com.google.samples.apps.nowinandroid.libs
|
|
|
|
|
import org.gradle.api.Plugin
|
|
|
|
|
import org.gradle.api.Project
|
|
|
|
|
import org.gradle.kotlin.dsl.configure
|
|
|
|
|
import org.gradle.kotlin.dsl.dependencies
|
|
|
|
|
|
|
|
|
|
class KmpLibraryConventionPlugin: Plugin<Project> {
|
|
|
|
|
override fun apply(target: Project) {
|
|
|
|
|
@ -38,6 +40,11 @@ class KmpLibraryConventionPlugin: Plugin<Project> {
|
|
|
|
|
// so resources inside ":core:module1" must be prefixed with "core_module1_"
|
|
|
|
|
resourcePrefix = path.split("""\W""".toRegex()).drop(1).distinct().joinToString(separator = "_").lowercase() + "_"
|
|
|
|
|
}
|
|
|
|
|
dependencies {
|
|
|
|
|
add("commonTestImplementation", libs.findLibrary("kotlin.test").get())
|
|
|
|
|
add("commonTestImplementation", libs.findLibrary("turbine").get())
|
|
|
|
|
add("commonTestImplementation", libs.findLibrary("kotlinx.coroutines.test").get())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|