Skip to content

Commit 1356308

Browse files
committed
Add -PenableMavenLocal and -PenableGradleMetadata build options
Both are disabled by default
1 parent 0e5f31c commit 1356308

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

build.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ val skipJavadoc by extra {
8484
boolProp("skipJavadoc") ?: false
8585
}
8686

87+
val enableMavenLocal by extra {
88+
boolProp("enableMavenLocal") ?: false
89+
}
90+
91+
val enableGradleMetadata by extra {
92+
boolProp("enableGradleMetadata") ?: false
93+
}
94+
8795
// By default use Java implementation to sign artifacts
8896
// When useGpgCmd=true, then gpg command line tool is used for signing
8997
val useGpgCmd by extra {
@@ -252,6 +260,9 @@ allprojects {
252260
}
253261

254262
repositories {
263+
if (enableMavenLocal) {
264+
mavenLocal()
265+
}
255266
mavenCentral()
256267
}
257268
val sourceSets: SourceSetContainer by project
@@ -260,6 +271,12 @@ allprojects {
260271
apply(plugin = "de.thetaphi.forbiddenapis")
261272
apply(plugin = "maven-publish")
262273

274+
if (!enableGradleMetadata) {
275+
tasks.withType<GenerateModuleMetadata> {
276+
enabled = false
277+
}
278+
}
279+
263280
if (isReleaseVersion) {
264281
configure<SigningExtension> {
265282
// Sign all the publications

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ calcite.avatica.version=1.16.0
2727
# The options below configures the use of local clone (e.g. testing development versions)
2828
# You can pass un-comment it, or pass option -PlocalReleasePlugins, or -PlocalReleasePlugins=<path>
2929
# localReleasePlugins=../vlsi-release-plugins
30+
# enableMavenLocal=true
31+
# Gradle metadata is not well supported in the build script, so it is disabled for now
32+
# publishGradleMetadata=true
3033

3134
# Plugins
3235
com.github.johnrengelman.shadow.version=5.1.0

0 commit comments

Comments
 (0)