Skip to content

Commit

Permalink
Do not apply ModelCompiler to "proto-extension" module. Remove some…
Browse files Browse the repository at this point in the history
… unnecessary build scripts. Remove usage of `System.out`.
  • Loading branch information
Oleg-Melnik committed Jul 31, 2024
1 parent 45c4ad4 commit 8650911
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 178 deletions.
8 changes: 7 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ subprojects {
plugin("detekt-code-analysis")
plugin("com.google.protobuf")
plugin("idea")
plugin("io.spine.mc-java")
}

// Apply ModelCompiler to every subproject except "proto-extension".
if (!name.contains("proto-extension")) {
apply {
plugin("io.spine.mc-java")
}
}

dependencies {
Expand Down
45 changes: 0 additions & 45 deletions buildSrc/src/main/kotlin/build-proto-model.gradle.kts

This file was deleted.

45 changes: 0 additions & 45 deletions buildSrc/src/main/kotlin/compile-protobuf.gradle.kts

This file was deleted.

57 changes: 0 additions & 57 deletions buildSrc/src/main/kotlin/config-tester.gradle.kts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,8 @@ class `ApplySizeOptionPlugin should` {
} catch (_: UnexpectedBuildFailure) {
}

val sdterrContent = stderr.toString()
val errorFound = sdterrContent.contains(expectedExceptionMessage)

System.err.println(sdterrContent)

//check(errorFound) { sdterrContent }

assertTrue(
errorFound,
stderr.toString().contains(expectedExceptionMessage),
"The expected exception was not thrown."
)
}
Expand Down
23 changes: 1 addition & 22 deletions proto-extension/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import io.spine.internal.dependency.AutoService
import io.spine.internal.dependency.AutoServiceKsp
import io.spine.internal.dependency.HelloProtoData
import io.spine.internal.dependency.Validation

plugins {
`maven-publish`
Expand All @@ -35,19 +34,8 @@ plugins {

dependencies {
// To use @AutoService in options provider.
compileOnly(AutoService.annotations)
api(AutoService.annotations)
ksp(AutoServiceKsp.processor)

// To allow access to `ValidatingBuilder` from the generated Kotlin code.
implementation(Validation.runtime)
}

modelCompiler {
java {
codegen {
validation().enabled.set(false)
}
}
}

publishing {
Expand All @@ -58,12 +46,3 @@ publishing {
}
}
}

// To avoid warning on implicit tasks dependency.
// See https://discuss.gradle.org/t/implicit-dependency-among-tasks-but-the-tasks-do-not-exist/46127
// for details.
tasks.configureEach {
if (name == "kspKotlin") {
mustRunAfter(tasks.named("launchProtoData"))
}
}

0 comments on commit 8650911

Please sign in to comment.