feature add support java 17, gradle 8
This commit is contained in:
parent
5c46386ebf
commit
a6dcd67a81
|
|
@ -9,6 +9,7 @@ plugins {
|
|||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
@ -16,10 +17,10 @@ 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"))
|
||||
|
|
@ -27,7 +28,7 @@ dependencies {
|
|||
|
||||
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