Skip to content

Commit

Permalink
buildscripts: avoid using (deprecated) space-assignment syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Dec 23, 2024
1 parent 2153f65 commit 28207da
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
12 changes: 6 additions & 6 deletions MinieAssets/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies {
}

tasks.register('models', JavaExec) {
description 'Generates C-G model assets used in MinieExamples.'
description = 'Generates C-G model assets used in MinieExamples.'
mainClass = 'jme3utilities.minie.test.models.ImportCgms'
outputs.files([
baseMesh + '/BaseMesh.j3o',
Expand All @@ -84,7 +84,7 @@ tasks.register('shapes') {
dependsOn 'ankhShape', 'bananaShape', 'barrelShape', 'bowlingPinShape', \
'duckShape', 'glyphShapes', 'heartShape', 'horseshoeShape', \
'swordShape', 'teapotShape'
description 'Generates collision-shape assets used in MinieExamples.'
description = 'Generates collision-shape assets used in MinieExamples.'
}
tasks.register('ankhShape', JavaExec) {
mainClass = 'jme3utilities.minie.test.shapes.MakeAnkh'
Expand Down Expand Up @@ -129,7 +129,7 @@ tasks.register('teapotShape', JavaExec) {

tasks.register('textures') {
dependsOn 'greenTile', 'plaid', 'poolBalls'
description 'Generates texture assets used in MinieExamples.'
description = 'Generates texture assets used in MinieExamples.'
}
tasks.register('greenTile', JavaExec) {
mainClass = 'jme3utilities.minie.test.textures.MakeGreenTile'
Expand All @@ -152,7 +152,7 @@ tasks.register('cleanModels', Delete) {
delete(baseMesh, candyDish, duck, elephant, jaime, mhGame, \
monkeyHead, ninja, sinbad)
dependsOn 'cleanOto'
description 'Deletes generated model assets.'
description = 'Deletes generated model assets.'
}
tasks.register('cleanOto', Delete) {
delete fileTree(dir: oto, include: 'Oto.*')
Expand All @@ -163,7 +163,7 @@ tasks.register('cleanShapes') {
'cleanBowlingPinShape', 'cleanDuckShape', 'cleanGlyphShapes', \
'cleanHeartShape', 'cleanHorseshoeShape', 'cleanSwordShape', \
'cleanTeapotShape'
description 'Deletes generated collision-shape assets.'
description = 'Deletes generated collision-shape assets.'
}
tasks.register('cleanAnkhShape', Delete) {
delete ankhShape
Expand Down Expand Up @@ -198,5 +198,5 @@ tasks.register('cleanTeapotShape', Delete) {

tasks.register('cleanTextures', Delete) {
delete(greenTile, plaid, poolBalls)
description 'Deletes generated texture assets.'
description = 'Deletes generated texture assets.'
}
26 changes: 13 additions & 13 deletions MinieLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ dependencies {
}

test {
failFast true // stop after first failure
forkEvery 1 // don't run tests in parallel
failFast = true // stop after first failure
forkEvery = 1 // don't run tests in parallel
testLogging {
events 'started', 'skipped', 'failed'
}
Expand Down Expand Up @@ -289,11 +289,11 @@ tasks.register('cleanWindows64', Delete) {

tasks.register('install') {
dependsOn 'publishMavenPublicationToMavenLocal'
description 'Installs Maven artifacts to the local repository.'
description = 'Installs Maven artifacts to the local repository.'
}
tasks.register('release') {
dependsOn 'publishMavenPublicationToOSSRHRepository'
description 'Stages Maven artifacts to Sonatype OSSRH.'
description = 'Stages Maven artifacts to Sonatype OSSRH.'
}

jar {
Expand All @@ -314,41 +314,41 @@ tasks.register('javadocJar', Jar) {
archiveBaseName = project.ext.baseName
archiveClassifier = 'javadoc'
dependsOn 'javadoc'
description 'Creates a JAR of javadoc.'
description = 'Creates a JAR of javadoc.'
from javadoc.destinationDir
}
tasks.register('sourcesJar', Jar) {
archiveBaseName = project.ext.baseName
archiveClassifier = 'sources'
description 'Creates a JAR of sourcecode.'
description = 'Creates a JAR of sourcecode.'
from sourceSets.main.allJava // default is ".allSource", which includes resources
}

assemble.dependsOn('module', 'moduleAsc', 'pom', 'pomAsc')
tasks.register('module', Copy) {
dependsOn 'generateMetadataFileForMavenPublication'
description 'Copies the module metadata to build/libs.'
description = 'Copies the module metadata to build/libs.'
from "${buildDir}/publications/maven/module.json"
into "${buildDir}/libs"
rename 'module.json', project.ext.baseName + '.module'
}
tasks.register('moduleAsc', Copy) {
dependsOn 'signMavenPublication'
description 'Copies the signature of the module metadata to build/libs.'
description = 'Copies the signature of the module metadata to build/libs.'
from "${buildDir}/publications/maven/module.json.asc"
into "${buildDir}/libs"
rename 'module.json.asc', project.ext.baseName + '.module.asc'
}
tasks.register('pom', Copy) {
dependsOn 'generatePomFileForMavenPublication'
description 'Copies the Maven POM to build/libs.'
description = 'Copies the Maven POM to build/libs.'
from "${buildDir}/publications/maven/pom-default.xml"
into "${buildDir}/libs"
rename 'pom-default.xml', project.ext.baseName + '.pom'
}
tasks.register('pomAsc', Copy) {
dependsOn 'signMavenPublication'
description 'Copies the signature of the Maven POM to build/libs.'
description = 'Copies the signature of the Maven POM to build/libs.'
from "${buildDir}/publications/maven/pom-default.xml.asc"
into "${buildDir}/libs"
rename 'pom-default.xml.asc', project.ext.baseName + '.pom.asc'
Expand All @@ -359,9 +359,9 @@ publishing {
maven(MavenPublication) {
artifact javadocJar
artifact sourcesJar
artifactId artifact
artifactId = artifact
from components.java
groupId project.ext.group
groupId = project.ext.group
pom {
description = 'a physics library for jMonkeyEngine'
developers {
Expand All @@ -385,7 +385,7 @@ publishing {
}
url = 'https://stephengold.github.io/Minie'
}
version project.ext.version + rootProject.ext.minieSnapshot
version = project.ext.version + rootProject.ext.minieSnapshot
}
}
// Staging to OSSRH relies on the existence of 2 properties
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tasks.register('checkstyle') {
':MinieAssets:checkstyleMain', ':MinieDump:checkstyleMain', \
':MinieExamples:checkstyleMain', ':MinieLibrary:checkstyleMain', \
':MinieLibrary:checkstyleTest', ':TutorialApps:checkstyleMain'
description 'Checks the style of all Java sourcecode.'
description = 'Checks the style of all Java sourcecode.'
}

// Register cleanup tasks:
Expand All @@ -35,9 +35,9 @@ tasks.register('cleanNodeModules', Delete) {

tasks.register('install') {
dependsOn ':MinieLibrary:install'
description 'Installs Maven artifacts to the local repository.'
description = 'Installs Maven artifacts to the local repository.'
}
tasks.register('release') {
dependsOn ':MinieLibrary:release'
description 'Stages Maven artifacts to Sonatype OSSRH.'
description = 'Stages Maven artifacts to Sonatype OSSRH.'
}
4 changes: 2 additions & 2 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ java {
}

checkstyle {
toolVersion libs.versions.checkstyle.get()
toolVersion = libs.versions.checkstyle.get()
}

tasks.withType(JavaCompile).configureEach { // Java compile-time options:
Expand Down Expand Up @@ -37,7 +37,7 @@ tasks.withType(JavaExec).configureEach { // Java runtime options:
}
//args '--verbose' // to enable additional log output
classpath sourceSets.main.runtimeClasspath
enableAssertions true
enableAssertions = true
//jvmArgs '-verbose:gc'
//jvmArgs '-Xcheck:jni'
jvmArgs '-Xms1024m', '-Xmx1024m' // to enlarge the Java heap
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ dependencyResolutionManagement {
repositories {
//mavenLocal() // to find libraries installed locally
mavenCentral() // to find libraries released to the Maven Central repository
//maven { url 'https://s01.oss.sonatype.org/content/groups/staging' } // to find libraries staged but not yet released
//maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' } // to find public snapshots of libraries
//maven { url = 'https://s01.oss.sonatype.org/content/groups/staging' } // to find libraries staged but not yet released
//maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots' } // to find public snapshots of libraries
}
}

Expand Down

0 comments on commit 28207da

Please sign in to comment.