Merge branch 'feature/gradle_8_support' into gradle8_to_java17
This commit is contained in:
commit
1baa9ce618
|
|
@ -1,14 +1,15 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
`java-gradle-plugin`
|
||||
`kotlin-dsl`
|
||||
id("java-gradle-plugin")
|
||||
id("org.gradle.kotlin.kotlin-dsl") version "4.1.2"
|
||||
}
|
||||
|
||||
// The kotlin-dsl plugin requires a repository to be declared
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
@ -16,18 +17,17 @@ dependencies {
|
|||
implementation("com.android.tools.build:gradle:7.1.3")
|
||||
|
||||
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.10.0")
|
||||
implementation("de.aaschmid:gradle-cpd-plugin:3.1")
|
||||
implementation("de.aaschmid:gradle-cpd-plugin:3.3")
|
||||
|
||||
// kotlin plugin, required by custom plugin
|
||||
implementation(kotlin("gradle-plugin", embeddedKotlinVersion))
|
||||
implementation(kotlin("gradle-plugin", "1.8.10"))
|
||||
|
||||
gradleKotlinDsl()
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
compileKotlin.kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "17"
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
|
|
|
|||
|
|
@ -52,9 +52,13 @@ abstract class ApiGeneratorPlugin : Plugin<Project> {
|
|||
val outputLanguage = extension.outputLanguage ?: throw IllegalStateException("Configure output language code for api generator plugin")
|
||||
|
||||
javaexec {
|
||||
main = "-jar"
|
||||
mainClass.set("-jar")
|
||||
workingDir = rootDir
|
||||
args = listOfNotNull(
|
||||
"--add-opens",
|
||||
"java.base/java.lang=ALL-UNNAMED",
|
||||
"--add-opens",
|
||||
"java.base/java.time=ALL-UNNAMED",
|
||||
configurations.getByName("apiGenerator").asPath,
|
||||
"generate-client-code",
|
||||
"--output-language",
|
||||
|
|
@ -68,7 +72,7 @@ abstract class ApiGeneratorPlugin : Plugin<Project> {
|
|||
"--package-name",
|
||||
extension.outputPackageName,
|
||||
"--recreate_output_dirs",
|
||||
extension.recreateOutputDir.toString()
|
||||
extension.recreateOutputDir.toString(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class CpdLinter : Linter {
|
|||
}
|
||||
tasks.withType<Cpd> {
|
||||
reports.xml.required.set(true)
|
||||
reports.xml.destination = getCpdReportFile()
|
||||
reports.xml.outputLocation.set(getCpdReportFile())
|
||||
ignoreFailures = true
|
||||
source = getSources(extension.excludes)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue