Add JVM library convention to build-plugin
This commit is contained in:
parent
e17b4c78ea
commit
d00c9f337c
6 changed files with 37 additions and 0 deletions
|
@ -5,6 +5,8 @@ plugins {
|
|||
dependencies {
|
||||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||
|
||||
implementation(plugin(libs.plugins.kotlin.jvm))
|
||||
|
||||
implementation(plugin(libs.plugins.spotless))
|
||||
}
|
||||
|
||||
|
|
6
build-plugin/src/main/kotlin/ThunderbirdPlugins.kt
Normal file
6
build-plugin/src/main/kotlin/ThunderbirdPlugins.kt
Normal file
|
@ -0,0 +1,6 @@
|
|||
object ThunderbirdPlugins {
|
||||
|
||||
object Library {
|
||||
const val jvm = "thunderbird.library.jvm"
|
||||
}
|
||||
}
|
6
build-plugin/src/main/kotlin/ThunderbirdProjectConfig.kt
Normal file
6
build-plugin/src/main/kotlin/ThunderbirdProjectConfig.kt
Normal file
|
@ -0,0 +1,6 @@
|
|||
import org.gradle.api.JavaVersion
|
||||
|
||||
object ThunderbirdProjectConfig {
|
||||
|
||||
val javaVersion = JavaVersion.VERSION_11
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
plugins {
|
||||
`java-library`
|
||||
id("org.jetbrains.kotlin.jvm")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
targetCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(libs.bundles.library.jvm.test)
|
||||
}
|
|
@ -121,3 +121,11 @@ jdom2 = "org.jdom:jdom2:2.0.6.1"
|
|||
icu4j-charset = "com.ibm.icu:icu4j-charset:72.1"
|
||||
|
||||
leakcanary-android = "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
||||
|
||||
[bundles]
|
||||
library-jvm-test = [
|
||||
"junit",
|
||||
"truth",
|
||||
"mockito-inline",
|
||||
"mockito-kotlin",
|
||||
]
|
||||
|
|
|
@ -17,6 +17,8 @@ dependencyResolutionManagement {
|
|||
|
||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
|
||||
rootProject.name = "k-9"
|
||||
|
||||
includeBuild("build-plugin")
|
||||
|
||||
include(
|
||||
|
|
Loading…
Reference in a new issue