Skip to content
Snippets Groups Projects
Commit 740481ab authored by dgelessus's avatar dgelessus
Browse files

Replace convention properties with extension blocks in build.gradle

The Gradle documentation says that these convention properties are
deprecated and superseded by the java and application extension blocks.
Using the convention properties doesn't generate warnings yet, but it
can't hurt to switch to the now recommended way.
parent 843c6fb9
Branches
Tags
No related merge requests found
Pipeline #54953 passed
...@@ -17,20 +17,22 @@ wrapper { ...@@ -17,20 +17,22 @@ wrapper {
distributionType = Wrapper.DistributionType.ALL distributionType = Wrapper.DistributionType.ALL
} }
sourceCompatibility = 7
targetCompatibility = 7
repositories { repositories {
mavenCentral() mavenCentral()
} }
mainClassName = "org.sablecc.sablecc.SableCC"
java { java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
withSourcesJar() withSourcesJar()
withJavadocJar() withJavadocJar()
} }
application {
mainClass = "org.sablecc.sablecc.SableCC"
}
processResources { processResources {
inputs.property("project.version", project.version) inputs.property("project.version", project.version)
filesMatching("org/sablecc/sablecc/build.properties") { filesMatching("org/sablecc/sablecc/build.properties") {
...@@ -41,7 +43,7 @@ processResources { ...@@ -41,7 +43,7 @@ processResources {
jar { jar {
manifest { manifest {
attributes([ attributes([
'Main-Class': mainClassName, 'Main-Class': application.mainClass.get(),
'Automatic-Module-Name': 'org.sablecc.sablecc', 'Automatic-Module-Name': 'org.sablecc.sablecc',
]) ])
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment