Merge pull request #6672 from thundernest/add-jvm-build-plugin

Add JVM build plugin
This commit is contained in:
Wolf-Martell Montwé 2023-02-15 17:55:40 +01:00 committed by GitHub
commit c3b8e1b76f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 54 additions and 75 deletions

View file

@ -1,6 +1,5 @@
plugins {
id 'java-library'
id 'kotlin'
id "thunderbird.library.jvm"
alias(libs.plugins.android.lint)
}

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
plugins {
id 'java-library'
id 'kotlin'
id "thunderbird.library.jvm"
alias(libs.plugins.android.lint)
}

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
plugins {
id 'java-library'
id 'kotlin'
id "thunderbird.library.jvm"
alias(libs.plugins.android.lint)
}

View file

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

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

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
plugins {
id 'java-library'
id 'kotlin'
id "thunderbird.library.jvm"
alias(libs.plugins.android.lint)
}

View file

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