Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03b0d3a793 |
@@ -7,11 +7,8 @@ plugins {
|
||||
|
||||
// The kotlin-dsl plugin requires a repository to be declared
|
||||
repositories {
|
||||
maven { url = uri("https://nexus.lan.ubrr.ru/repository/gradle-central") }
|
||||
maven { url = uri("https://nexus.lan.ubrr.ru/repository/maven-jcenter") }
|
||||
jcenter()
|
||||
google()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -19,28 +16,18 @@ 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.3")
|
||||
implementation("de.aaschmid:gradle-cpd-plugin:3.1")
|
||||
|
||||
// kotlin plugin, required by custom plugin
|
||||
implementation(kotlin("gradle-plugin", "1.8.10"))
|
||||
implementation(kotlin("gradle-plugin", embeddedKotlinVersion))
|
||||
|
||||
gradleKotlinDsl()
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
|
||||
//val compileJava: JavaCompile by tasks
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
//compileJava.apply {
|
||||
// sourceCompatibility = JavaVersion.VERSION_17.toString()
|
||||
// targetCompatibility = JavaVersion.VERSION_17.toString()
|
||||
//}
|
||||
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
compileKotlin.kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
|
||||
@@ -52,13 +52,9 @@ abstract class ApiGeneratorPlugin : Plugin<Project> {
|
||||
val outputLanguage = extension.outputLanguage ?: throw IllegalStateException("Configure output language code for api generator plugin")
|
||||
|
||||
javaexec {
|
||||
mainClass.set("-jar")
|
||||
main = "-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",
|
||||
@@ -72,7 +68,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.outputLocation.set(getCpdReportFile())
|
||||
reports.xml.destination = getCpdReportFile()
|
||||
ignoreFailures = true
|
||||
source = getSources(extension.excludes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user