Add -PenableMavenLocal and -PenableGradleMetadata build options

Both are disabled by default
diff --git a/build.gradle.kts b/build.gradle.kts
index 3a3013c..5749633 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -84,6 +84,14 @@
     boolProp("skipJavadoc") ?: false
 }
 
+val enableMavenLocal by extra {
+    boolProp("enableMavenLocal") ?: false
+}
+
+val enableGradleMetadata by extra {
+    boolProp("enableGradleMetadata") ?: false
+}
+
 // By default use Java implementation to sign artifacts
 // When useGpgCmd=true, then gpg command line tool is used for signing
 val useGpgCmd by extra {
@@ -252,6 +260,9 @@
         }
 
         repositories {
+            if (enableMavenLocal) {
+                mavenLocal()
+            }
             mavenCentral()
         }
         val sourceSets: SourceSetContainer by project
@@ -260,6 +271,12 @@
         apply(plugin = "de.thetaphi.forbiddenapis")
         apply(plugin = "maven-publish")
 
+        if (!enableGradleMetadata) {
+            tasks.withType<GenerateModuleMetadata> {
+                enabled = false
+            }
+        }
+
         if (isReleaseVersion) {
             configure<SigningExtension> {
                 // Sign all the publications
diff --git a/gradle.properties b/gradle.properties
index 5c7478d..5f9d2a3 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -27,6 +27,9 @@
 # The options below configures the use of local clone (e.g. testing development versions)
 # You can pass un-comment it, or pass option -PlocalReleasePlugins, or -PlocalReleasePlugins=<path>
 # localReleasePlugins=../vlsi-release-plugins
+# enableMavenLocal=true
+# Gradle metadata is not well supported in the build script, so it is disabled for now
+# publishGradleMetadata=true
 
 # Plugins
 com.github.johnrengelman.shadow.version=5.1.0