2023-08-02 01:30:48 -04:00
|
|
|
import static org.gradle.internal.logging.text.StyledTextOutput.Style
|
|
|
|
|
|
|
|
import org.apereo.cas.metadata.*
|
|
|
|
import org.gradle.internal.logging.text.*
|
|
|
|
|
|
|
|
import groovy.json.*
|
|
|
|
import groovy.time.*
|
2020-03-29 16:36:54 -04:00
|
|
|
|
|
|
|
import java.nio.file.*
|
2023-08-02 01:30:48 -04:00
|
|
|
import java.util.*
|
|
|
|
import java.security.*
|
2020-03-29 16:36:54 -04:00
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
2023-08-02 01:30:48 -04:00
|
|
|
gradlePluginPortal()
|
|
|
|
maven {
|
|
|
|
url 'https://oss.sonatype.org/content/repositories/snapshots'
|
|
|
|
mavenContent { snapshotsOnly() }
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
url "https://repo.spring.io/milestone"
|
|
|
|
mavenContent { releasesOnly() }
|
|
|
|
}
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath "org.apache.ivy:ivy:${project.ivyVersion}"
|
2023-08-02 01:30:48 -04:00
|
|
|
classpath "org.apereo.cas:cas-server-core-configuration-metadata-repository:${project.'cas.version'}"
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
apply plugin: "de.undercouch.download"
|
|
|
|
|
|
|
|
task run(group: "build", description: "Run the CAS web application in embedded container mode") {
|
|
|
|
dependsOn 'build'
|
|
|
|
doLast {
|
2023-08-02 01:30:48 -04:00
|
|
|
def casRunArgs = Arrays.asList("-server -noverify -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1".split(" "))
|
|
|
|
project.javaexec {
|
2020-03-29 16:36:54 -04:00
|
|
|
jvmArgs = casRunArgs
|
2023-08-02 01:30:48 -04:00
|
|
|
classpath = project.files("build/libs/cas.war")
|
|
|
|
systemProperties = System.properties
|
2020-03-29 16:36:54 -04:00
|
|
|
logger.info "Started ${commandLine}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task setExecutable(group: "CAS", description: "Configure the project to run in executable mode") {
|
2020-03-29 16:36:54 -04:00
|
|
|
doFirst {
|
|
|
|
project.setProperty("executable", "true")
|
|
|
|
logger.info "Configuring the project as executable"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task executable(type: Exec, group: "CAS", description: "Run the CAS web application in standalone executable mode") {
|
2020-03-29 16:36:54 -04:00
|
|
|
dependsOn setExecutable, 'build'
|
|
|
|
doFirst {
|
|
|
|
workingDir "."
|
|
|
|
if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
|
|
commandLine "chmod", "+x", bootWar.archivePath
|
|
|
|
}
|
|
|
|
logger.info "Running ${bootWar.archivePath}"
|
|
|
|
commandLine bootWar.archivePath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
|
|
|
|
task debug(group: "CAS", description: "Debug the CAS web application in embedded mode on port 5005") {
|
2020-03-29 16:36:54 -04:00
|
|
|
dependsOn 'build'
|
|
|
|
doLast {
|
|
|
|
logger.info "Debugging process is started in a suspended state, listening on port 5005."
|
|
|
|
def casArgs = Arrays.asList("-Xmx2048M".split(" "))
|
2023-08-02 01:30:48 -04:00
|
|
|
project.javaexec {
|
2020-03-29 16:36:54 -04:00
|
|
|
jvmArgs = casArgs
|
|
|
|
debug = true
|
2023-08-02 01:30:48 -04:00
|
|
|
classpath = project.files("build/libs/cas.war")
|
|
|
|
systemProperties = System.properties
|
2020-03-29 16:36:54 -04:00
|
|
|
logger.info "Started ${commandLine}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task showConfiguration(group: "CAS", description: "Show configurations for each dependency, etc") {
|
2020-03-29 16:36:54 -04:00
|
|
|
doLast() {
|
|
|
|
def cfg = project.hasProperty("configuration") ? project.property("configuration") : "compile"
|
|
|
|
configurations.getByName(cfg).each { println it }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task allDependenciesInsight(group: "build", type: DependencyInsightReportTask, description: "Produce insight information for all dependencies") {}
|
|
|
|
|
|
|
|
task allDependencies(group: "build", type: DependencyReportTask, description: "Display a graph of all project dependencies") {}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task casVersion(group: "CAS", description: "Display the current CAS version") {
|
2020-03-29 16:36:54 -04:00
|
|
|
doFirst {
|
|
|
|
def verbose = project.hasProperty("verbose") && Boolean.valueOf(project.getProperty("verbose"))
|
|
|
|
if (verbose) {
|
|
|
|
def out = services.get(StyledTextOutputFactory).create("CAS")
|
|
|
|
println "******************************************************************"
|
2023-08-02 01:30:48 -04:00
|
|
|
out.withStyle(Style.Info).println "Apereo CAS ${project.version}"
|
2020-03-29 16:36:54 -04:00
|
|
|
out.withStyle(Style.Description).println "Enterprise Single SignOn for all earthlings and beyond"
|
|
|
|
out.withStyle(Style.SuccessHeader).println "- GitHub: "
|
|
|
|
out.withStyle(Style.Success).println "https://github.com/apereo/cas"
|
|
|
|
out.withStyle(Style.SuccessHeader).println "- Docs: "
|
|
|
|
out.withStyle(Style.Success).println "https://apereo.github.io/cas"
|
|
|
|
out.withStyle(Style.SuccessHeader).println "- Blog: "
|
|
|
|
out.withStyle(Style.Success).println "https://apereo.github.io"
|
|
|
|
println "******************************************************************"
|
|
|
|
} else {
|
2023-08-02 01:30:48 -04:00
|
|
|
println project.version
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task springBootVersion(description: "Display current Spring Boot version") {
|
|
|
|
doLast {
|
|
|
|
println rootProject.springBootVersion
|
|
|
|
}
|
|
|
|
}
|
2020-03-29 16:36:54 -04:00
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task zip(type: Zip) {
|
|
|
|
from projectDir
|
|
|
|
exclude '**/.idea/**', '.gradle', 'tmp', '.git', '**/build/**', '**/bin/**', '**/out/**', '**/.settings/**'
|
|
|
|
destinationDirectory = buildDir
|
|
|
|
archiveFileName = "${project.name}.zip"
|
|
|
|
def zipFile = new File("${buildDir}/${archiveFileName}")
|
|
|
|
doLast {
|
|
|
|
if (zipFile.exists()) {
|
|
|
|
println "Zip archive is available at ${zipFile.absolutePath}"
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
2023-08-02 01:30:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task createKeystore(group: "CAS", description: "Create CAS keystore") {
|
|
|
|
def dn = "CN=cas.example.org,OU=Example,OU=Org,C=US"
|
|
|
|
if (project.hasProperty("certificateDn")) {
|
|
|
|
dn = project.getProperty("certificateDn")
|
|
|
|
}
|
|
|
|
def subjectAltName = "dns:example.org,dns:localhost,ip:127.0.0.1"
|
|
|
|
if (project.hasProperty("certificateSubAltName")) {
|
|
|
|
subjectAltName = project.getProperty("certificateSubAltName")
|
|
|
|
}
|
|
|
|
|
|
|
|
doFirst {
|
|
|
|
def certDir = project.getProperty("certDir")
|
|
|
|
def serverKeyStore = project.getProperty("serverKeystore")
|
|
|
|
def exportedServerCert = project.getProperty("exportedServerCert")
|
|
|
|
def storeType = project.getProperty("storeType")
|
|
|
|
def keystorePath = "$certDir/$serverKeyStore"
|
|
|
|
def serverCert = "$certDir/$exportedServerCert"
|
|
|
|
|
|
|
|
mkdir certDir
|
2020-03-29 16:36:54 -04:00
|
|
|
// this will fail if thekeystore exists and has cert with cas alias already (so delete if you want to recreate)
|
|
|
|
logger.info "Generating keystore for CAS with DN ${dn}"
|
|
|
|
exec {
|
|
|
|
workingDir "."
|
|
|
|
commandLine "keytool", "-genkeypair", "-alias", "cas",
|
|
|
|
"-keyalg", "RSA",
|
|
|
|
"-keypass", "changeit", "-storepass", "changeit",
|
|
|
|
"-keystore", keystorePath,
|
2023-08-02 01:30:48 -04:00
|
|
|
"-dname", dn, "-ext", "SAN=${subjectAltName}",
|
|
|
|
"-storetype", storeType
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
logger.info "Exporting cert from keystore..."
|
|
|
|
exec {
|
|
|
|
workingDir "."
|
|
|
|
commandLine "keytool", "-exportcert", "-alias", "cas",
|
|
|
|
"-storepass", "changeit", "-keystore", keystorePath,
|
2023-08-02 01:30:48 -04:00
|
|
|
"-file", serverCert
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
2023-08-02 01:30:48 -04:00
|
|
|
logger.info "Import $serverCert into your Java truststore (\$JAVA_HOME/lib/security/cacerts)"
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task unzipWAR(type: Copy, group: "CAS", description: "Explodes the CAS web application archive") {
|
|
|
|
dependsOn 'build'
|
|
|
|
def destination = "${buildDir}/app"
|
2020-03-29 16:36:54 -04:00
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
from zipTree("build/libs/cas.war")
|
|
|
|
into "${destination}"
|
|
|
|
doLast {
|
|
|
|
println "Unzipped WAR into ${destination}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task verifyRequiredJavaVersion {
|
|
|
|
def currentVersion = org.gradle.api.JavaVersion.current()
|
|
|
|
logger.info "Checking current Java version ${currentVersion} for required Java version ${project.targetCompatibility}"
|
|
|
|
if (!currentVersion.name.equalsIgnoreCase("${project.targetCompatibility}")) {
|
|
|
|
logger.warn("Careful: Current Java version ${currentVersion} does not match required Java version ${project.targetCompatibility}")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task copyCasConfiguration(type: Copy, group: "CAS",
|
|
|
|
description: "Copy the CAS configuration from this project to /etc/cas/config") {
|
|
|
|
from "etc/cas/config"
|
|
|
|
into new File('/etc/cas/config').absolutePath
|
2020-03-29 16:36:54 -04:00
|
|
|
doFirst {
|
2023-08-02 01:30:48 -04:00
|
|
|
new File('/etc/cas/config').mkdirs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
def tomcatDirectory = "${buildDir}/apache-tomcat-${tomcatVersion}"
|
|
|
|
project.ext."tomcatDirectory" = tomcatDirectory
|
|
|
|
|
|
|
|
def explodedDir = "${buildDir}/app"
|
|
|
|
def explodedResourcesDir = "${buildDir}/cas-resources"
|
|
|
|
|
|
|
|
def resourcesJarName = "cas-server-webapp-resources"
|
|
|
|
def templateViewsJarName = "cas-server-support-thymeleaf"
|
|
|
|
|
|
|
|
task unzip(type: Copy, group: "CAS", description: "Explodes the CAS archive and resources jar from the CAS web application archive") {
|
|
|
|
dependsOn unzipWAR
|
|
|
|
from zipTree("${explodedDir}/WEB-INF/lib/${templateViewsJarName}-${project.'cas.version'}.jar")
|
|
|
|
into explodedResourcesDir
|
|
|
|
|
|
|
|
from zipTree("${explodedDir}/WEB-INF/lib/${resourcesJarName}-${project.'cas.version'}.jar")
|
|
|
|
into explodedResourcesDir
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
doLast {
|
|
|
|
println "Exploded WAR resources into ${explodedResourcesDir}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task downloadShell(group: "Shell", description: "Download CAS shell jar from snapshot or release maven repo", type: Download) {
|
|
|
|
def shellDir = project.providers.gradleProperty("shellDir").get()
|
|
|
|
def casVersion = project.providers.gradleProperty("cas.version").get()
|
|
|
|
def downloadFile
|
|
|
|
if (casVersion.contains("-SNAPSHOT")) {
|
|
|
|
def snapshotDir = "https://oss.sonatype.org/content/repositories/snapshots/org/apereo/cas/cas-server-support-shell/${casVersion}/"
|
|
|
|
def files = new org.apache.ivy.util.url.ApacheURLLister().listFiles(new URL(snapshotDir))
|
|
|
|
files = files.sort { it.path }
|
|
|
|
files.each {
|
|
|
|
if (it.path.endsWith(".jar")) {
|
|
|
|
downloadFile = it
|
|
|
|
}
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
2023-08-02 01:30:48 -04:00
|
|
|
} else {
|
|
|
|
downloadFile = "https://repo1.maven.org/maven2/org/apereo/cas/cas-server-support-shell/${casVersion}/cas-server-support-shell-${casVersion}.jar"
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
2023-08-02 01:30:48 -04:00
|
|
|
new File("${shellDir}").mkdir()
|
|
|
|
logger.info "Downloading file: ${downloadFile}"
|
|
|
|
src downloadFile
|
|
|
|
dest new File("${shellDir}", "cas-server-support-shell-${casVersion}.jar")
|
|
|
|
overwrite false
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task runShell(group: "Shell", description: "Run the CAS shell") {
|
|
|
|
dependsOn downloadShell
|
|
|
|
def casVersion = project.providers.gradleProperty("cas.version").get()
|
|
|
|
doLast {
|
|
|
|
println "Run the following command to launch the shell:\n\tjava -jar ${project.shellDir}/cas-server-support-shell-${casVersion}.jar"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task debugShell(group: "Shell", description: "Run the CAS shell with debug options, wait for debugger on port 5005") {
|
|
|
|
dependsOn downloadShell
|
|
|
|
def casVersion = project.providers.gradleProperty("cas.version").get()
|
|
|
|
doLast {
|
|
|
|
println """
|
|
|
|
Run the following command to launch the shell:\n\t
|
|
|
|
java -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=y -jar ${project.shellDir}/cas-server-support-shell-${casVersion}.jar
|
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task listTemplateViews(group: "CAS", description: "List all CAS views") {
|
|
|
|
dependsOn unzip
|
|
|
|
|
|
|
|
def templateViews = fileTree(explodedResourcesDir).matching {
|
|
|
|
include "**/*.html"
|
|
|
|
}
|
|
|
|
.collect {
|
|
|
|
return it.path.replace(explodedResourcesDir, "")
|
|
|
|
}
|
|
|
|
.toSorted()
|
2020-03-29 16:36:54 -04:00
|
|
|
|
|
|
|
doFirst {
|
2023-08-02 01:30:48 -04:00
|
|
|
templateViews.each { println it }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task getResource(group: "CAS", description: "Fetch a CAS resource and move it into the overlay") {
|
|
|
|
dependsOn unzip
|
2020-03-29 16:36:54 -04:00
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
def resourceName = project.providers.gradleProperty("resourceName").getOrNull()
|
|
|
|
def resourcesDirectory = fileTree(explodedResourcesDir)
|
|
|
|
def projectDirectory = projectDir
|
|
|
|
|
|
|
|
doFirst {
|
|
|
|
def results = resourcesDirectory.matching {
|
2020-03-29 16:36:54 -04:00
|
|
|
include "**/${resourceName}.*"
|
2023-08-02 01:30:48 -04:00
|
|
|
include "**/${resourceName}"
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
if (results.isEmpty()) {
|
|
|
|
println "No resources could be found matching ${resourceName}"
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if (results.size() > 1) {
|
2023-08-02 01:30:48 -04:00
|
|
|
println "Multiple resources found matching ${resourceName}:\n"
|
|
|
|
results.each {
|
|
|
|
println "\t-" + it.path.replace(explodedResourcesDir, "")
|
|
|
|
}
|
|
|
|
println "\nNarrow down your search criteria and try again."
|
2020-03-29 16:36:54 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
def fromFile = explodedResourcesDir
|
|
|
|
def resourcesDir = "src/main/resources"
|
2023-08-02 01:30:48 -04:00
|
|
|
new File(resourcesDir).mkdir()
|
2020-03-29 16:36:54 -04:00
|
|
|
|
|
|
|
def resourceFile = results[0].canonicalPath
|
2023-08-02 01:30:48 -04:00
|
|
|
def toResourceFile = new File("${projectDirectory}", resourceFile.replace(fromFile, resourcesDir))
|
|
|
|
toResourceFile.getParentFile().mkdirs()
|
|
|
|
|
|
|
|
Files.copy(Paths.get(resourceFile), Paths.get(toResourceFile.absolutePath), StandardCopyOption.REPLACE_EXISTING)
|
|
|
|
println "Copied file ${resourceFile} to ${toResourceFile}"
|
|
|
|
}
|
|
|
|
}
|
2020-03-29 16:36:54 -04:00
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task createTheme(group: "CAS", description: "Create theme directory structure in the overlay") {
|
|
|
|
def theme = project.providers.gradleProperty("theme").getOrNull()
|
2020-03-29 16:36:54 -04:00
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
doFirst {
|
|
|
|
def builder = new FileTreeBuilder()
|
|
|
|
new File("src/main/resources/${theme}.properties").delete()
|
|
|
|
|
|
|
|
builder.src {
|
|
|
|
main {
|
|
|
|
resources {
|
|
|
|
"static" {
|
|
|
|
themes {
|
|
|
|
"${theme}" {
|
|
|
|
css {
|
|
|
|
'cas.css'('')
|
|
|
|
}
|
|
|
|
js {
|
|
|
|
'cas.js'('')
|
|
|
|
}
|
|
|
|
images {
|
|
|
|
'.ignore'('')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
templates {
|
|
|
|
"${theme}" {
|
|
|
|
fragments {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
"${theme}.properties"("""cas.standard.css.file=/themes/${theme}/css/cas.css
|
|
|
|
cas.standard.js.file=/themes/${theme}/js/cas.js
|
|
|
|
""")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
def skipValidation = project.hasProperty("validate") && project.property("validate").equals("false")
|
|
|
|
if (!skipValidation) {
|
|
|
|
task validateConfiguration(type: Copy, group: "CAS",
|
|
|
|
description: "Validate CAS configuration") {
|
|
|
|
def file = new File("${projectDir}/src/main/resources/application.properties")
|
|
|
|
if (file.exists()) {
|
|
|
|
throw new GradleException("This overlay project is overriding a CAS-supplied configuration file at ${file.path}. "
|
|
|
|
+ "Overriding this file will disable all default CAS settings that are provided to the overlay, and "
|
|
|
|
+ "generally has unintended side-effects. It's best to move your configuration inside an application.yml "
|
|
|
|
+ "file, if you intend to keep the configuration bundled with the CAS web application. \n\nTo disable this "
|
|
|
|
+ "validation step, run the build with -Pvalidate=false.");
|
|
|
|
}
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
2023-08-02 01:30:48 -04:00
|
|
|
processResources.dependsOn(validateConfiguration)
|
2020-03-29 16:36:54 -04:00
|
|
|
}
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
task exportConfigMetadata(group: "CAS", description: "Export collection of CAS properties") {
|
|
|
|
def file = new File(project.rootDir, 'config-metadata.properties')
|
|
|
|
def queryType = ConfigurationMetadataCatalogQuery.QueryTypes.CAS
|
|
|
|
if (project.hasProperty("queryType")) {
|
|
|
|
queryType = ConfigurationMetadataCatalogQuery.QueryTypes.valueOf(project.findProperty("queryType"))
|
|
|
|
}
|
|
|
|
doLast {
|
|
|
|
file.withWriter('utf-8') { writer ->
|
|
|
|
def props = CasConfigurationMetadataCatalog.query(
|
|
|
|
ConfigurationMetadataCatalogQuery.builder()
|
|
|
|
.queryType(queryType)
|
|
|
|
.build())
|
|
|
|
.properties()
|
|
|
|
props.each { property ->
|
|
|
|
writer.writeLine("# Type: ${property.type}");
|
|
|
|
writer.writeLine("# Module: ${property.module}")
|
|
|
|
writer.writeLine("# Owner: ${property.owner}")
|
|
|
|
if (property.deprecationLevel != null) {
|
|
|
|
writer.writeLine("# This setting is deprecated with a severity level of ${property.deprecationLevel}.")
|
|
|
|
if (property.deprecationReason != null) {
|
|
|
|
writer.writeLine("# because ${property.deprecationReason}")
|
|
|
|
}
|
|
|
|
if (property.deprecationReason != null) {
|
|
|
|
writer.writeLine("# Replace with: ${property.deprecationReason}")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
writer.writeLine("#")
|
|
|
|
def description = property.description.replace("\n", "\n# ").replace("\r", "")
|
|
|
|
description = org.apache.commons.text.WordUtils.wrap(description, 70, "\n# ", true)
|
|
|
|
writer.writeLine("# ${description}")
|
|
|
|
writer.writeLine("#")
|
|
|
|
writer.writeLine("# ${property.name}: ${property.defaultValue}")
|
|
|
|
writer.writeLine("")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
println "Configuration metadata is available at ${file.absolutePath}"
|
|
|
|
}
|
|
|
|
}
|