Merge pull request #6672 from thundernest/add-jvm-build-plugin
Add JVM build plugin
This commit is contained in:
commit
c3b8e1b76f
23 changed files with 54 additions and 75 deletions
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -8,9 +7,4 @@ dependencies {
|
|||
api project(":app:autodiscovery:api")
|
||||
|
||||
implementation libs.minidns.hla
|
||||
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mockito.inline
|
||||
testImplementation libs.mockito.kotlin
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -10,9 +9,5 @@ dependencies {
|
|||
compileOnly libs.xmlpull
|
||||
implementation libs.okhttp
|
||||
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mockito.inline
|
||||
testImplementation libs.mockito.kotlin
|
||||
testImplementation libs.kxml2
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.jsoup
|
||||
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
@ -13,7 +12,4 @@ dependencies {
|
|||
ksp libs.moshi.kotlin.codegen
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.mockito.core
|
||||
testImplementation libs.truth
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -13,9 +12,5 @@ dependencies {
|
|||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation project(":backend:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.mockito.inline
|
||||
testImplementation libs.mockito.kotlin
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mime4j.dom
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
@ -15,6 +14,5 @@ dependencies {
|
|||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation project(':backend:testing')
|
||||
testImplementation libs.mockito.core
|
||||
testImplementation libs.okhttp.mockwebserver
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -10,6 +9,4 @@ dependencies {
|
|||
api project(":mail:protocols:smtp")
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.mockito.core
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -9,6 +8,4 @@ dependencies {
|
|||
api project(":mail:protocols:webdav")
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.mockito.core
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -21,9 +20,5 @@ dependencies {
|
|||
implementation libs.apache.httpclient5
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mockito.inline
|
||||
testImplementation libs.mockito.kotlin
|
||||
testImplementation libs.icu4j.charset
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -17,10 +16,6 @@ dependencies {
|
|||
implementation libs.okio
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mockito.core
|
||||
testImplementation libs.mockito.kotlin
|
||||
testImplementation libs.okio
|
||||
testImplementation libs.mime4j.core
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -12,10 +11,6 @@ dependencies {
|
|||
api project(":mail:common")
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mockito.core
|
||||
testImplementation libs.mockito.kotlin
|
||||
testImplementation libs.okio
|
||||
testImplementation libs.jzlib
|
||||
testImplementation libs.commons.io
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -15,9 +14,6 @@ dependencies {
|
|||
implementation libs.okio
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mockito.kotlin
|
||||
testImplementation libs.okio
|
||||
testImplementation libs.jzlib
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,5 @@ dependencies {
|
|||
compileOnly libs.apache.httpclient
|
||||
|
||||
testImplementation project(":mail:testing")
|
||||
testImplementation libs.junit
|
||||
testImplementation libs.truth
|
||||
testImplementation libs.mockito.inline
|
||||
testImplementation libs.apache.httpclient
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id 'java-library'
|
||||
id 'kotlin'
|
||||
id "thunderbird.library.jvm"
|
||||
alias(libs.plugins.android.lint)
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ dependencyResolutionManagement {
|
|||
|
||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
|
||||
rootProject.name = "k-9"
|
||||
|
||||
includeBuild("build-plugin")
|
||||
|
||||
include(
|
||||
|
|
Loading…
Reference in a new issue