Skip to content

Commit

Permalink
Publishing metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
covers1624 committed Jan 6, 2024
1 parent 818cfae commit fcda02e
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ processResources {
}
}

def publishingMetadata = project.layout.buildDirectory.file("libs/$archivesBaseName-$version-publishing.json")
def publishingMetadataTask = tasks.register("publishingMetadata") {
outputs.file(publishingMetadata)
doFirst {
publishingMetadata.get().asFile.text = JsonOutput.prettyPrint(JsonOutput.toJson([
[
'displayName' : "Ender Storage ${version}",
'mcVersion' : "${mc_version}",
'version' : "${mod_version}",
'classifier' : 'universal',
'modLoader' : 'neoforge',
'curseforgeId': '245174',
'modrinthId' : 'BbrHg80P'
]
]))
}
}

jar {
finalizedBy 'reobfJar'
finalizedBy 'signJar'
Expand Down Expand Up @@ -97,7 +115,7 @@ tasks.register("signJar") {
file(System.getenv("KEY_STORE_PROPS")).withReader {
def props = new Properties()
props.load(it)
args.addAll(props)
args.putAll(props)
}
} else if (project.hasProperty('keyStore')) {
args['keyStore'] = project.getProperty('keyStore')
Expand Down Expand Up @@ -138,6 +156,10 @@ publishing {
artifact jar
artifact sourcesJar
artifact javadocJar
artifact(publishingMetadata) {
builtBy publishingMetadataTask
classifier 'publishing'
}

pom {
name = archivesBaseName
Expand Down

0 comments on commit fcda02e

Please sign in to comment.