Skip to content

fixed escaping characters for library.properties #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,25 @@ val releaseRoot = "$rootDir/release"
val releaseName = libName
val releaseDirectory = "$releaseRoot/$releaseName"

tasks.register<WriteProperties>("writeLibraryProperties") {
tasks.register("writeLibraryProperties") {
group = "processing"
destinationFile = project.file("library.properties")

property("name", libraryProperties.getProperty("name"))
property("version", libraryProperties.getProperty("version"))
property("prettyVersion", project.version)
property("authors", libraryProperties.getProperty("authors"))
property("url", libraryProperties.getProperty("url"))
property("categories", libraryProperties.getProperty("categories"))
property("sentence", libraryProperties.getProperty("sentence"))
property("paragraph", libraryProperties.getProperty("paragraph"))
property("minRevision", libraryProperties.getProperty("minRevision"))
property("maxRevision", libraryProperties.getProperty("maxRevision"))
doLast {
val outputFile = project.file("library.properties")
val props = listOf(
"name=${libraryProperties.getProperty("name")}",
"version=${libraryProperties.getProperty("version")}",
"prettyVersion=${project.version}",
"authors=${libraryProperties.getProperty("authors")}",
"url=${libraryProperties.getProperty("url")}",
"categories=${libraryProperties.getProperty("categories")}",
"sentence=${libraryProperties.getProperty("sentence")}",
"paragraph=${libraryProperties.getProperty("paragraph")}",
"minRevision=${libraryProperties.getProperty("minRevision")}",
"maxRevision=${libraryProperties.getProperty("maxRevision")}"
)

outputFile.writeText(props.joinToString("\n") + "\n")
}
}

// define the order of running, to ensure clean is run first
Expand Down
Loading