Skip to content

Commit

Permalink
feat(gradle): create internal configuration
Browse files Browse the repository at this point in the history
It can be used to prevent specific libs from being included in published pom.xml
  • Loading branch information
lilgallon committed Jul 23, 2024
1 parent cb3ac8b commit c2a2f20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ subprojects {
exclude { element -> element.file.path.contains("generated") }
}
}

plugins.withType<JavaLibraryPlugin> {
val internal by configurations.creating {
isVisible = false
isCanBeConsumed = false
isCanBeResolved = false
}
configurations["compileClasspath"].extendsFrom(internal)
configurations["runtimeClasspath"].extendsFrom(internal)
configurations["testCompileClasspath"].extendsFrom(internal)
configurations["testRuntimeClasspath"].extendsFrom(internal)
}
}

nexusPublishing {
Expand Down
2 changes: 1 addition & 1 deletion ocpi-toolkit-2.2.1/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

dependencies {
implementation(project(":annotation-processor"))
internal(project(":annotation-processor"))
ksp(project(":annotation-processor"))
api(project(":transport"))

Expand Down

0 comments on commit c2a2f20

Please sign in to comment.