Add JVM library convention to build-plugin

This commit is contained in:
Wolf Montwé 2023-02-15 14:09:31 +01:00
parent e17b4c78ea
commit d00c9f337c
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
6 changed files with 37 additions and 0 deletions

View file

@ -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))
}

View file

@ -0,0 +1,6 @@
object ThunderbirdPlugins {
object Library {
const val jvm = "thunderbird.library.jvm"
}
}

View file

@ -0,0 +1,6 @@
import org.gradle.api.JavaVersion
object ThunderbirdProjectConfig {
val javaVersion = JavaVersion.VERSION_11
}

View file

@ -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)
}

View file

@ -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",
]

View file

@ -17,6 +17,8 @@ dependencyResolutionManagement {
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = "k-9"
includeBuild("build-plugin")
include(