-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to buildSrc plugins instead of subProjects
Use version catalogues to keep versions in sync Update to gradle 8.8
- Loading branch information
1 parent
a024ca3
commit ec43160
Showing
26 changed files
with
357 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,4 @@ | ||
// Note: "common.gradle" in the root project contains additional initialization | ||
// for this project. This initialization is applied in the "build.gradle" | ||
// of the root project. | ||
|
||
// NetBeans will automatically add "run" and "debug" tasks relying on the | ||
// "mainClass" property. You may however define the property prior executing | ||
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument. | ||
// | ||
// Note however, that you may define your own "run" and "debug" task if you | ||
// prefer. In this case NetBeans will not add these tasks but you may rely on | ||
// your own implementation. | ||
if (!hasProperty('mainClass')) { | ||
ext.mainClass = '' | ||
} | ||
|
||
dependencies { | ||
// no dependencies | ||
} | ||
plugins { | ||
id 'zencode-common' | ||
id 'zencode-publish' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
// Note: "common.gradle" in the root project contains additional initialization | ||
// for this project. This initialization is applied in the "build.gradle" | ||
// of the root project. | ||
|
||
// NetBeans will automatically add "run" and "debug" tasks relying on the | ||
// "mainClass" property. You may however define the property prior executing | ||
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument. | ||
// | ||
// Note however, that you may define your own "run" and "debug" task if you | ||
// prefer. In this case NetBeans will not add these tasks but you may rely on | ||
// your own implementation. | ||
if (!hasProperty('mainClass')) { | ||
ext.mainClass = '' | ||
plugins { | ||
id 'zencode-common' | ||
id 'zencode-publish' | ||
} | ||
|
||
dependencies { | ||
api group: 'org.ow2.asm', name: 'asm', version: '9.3' | ||
api group: 'org.ow2.asm', name: 'asm-commons', version: '9.3' | ||
api libs.asm | ||
api libs.asm.commons | ||
api project(':CodeModel') | ||
api project(':JavaShared') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'org.ow2.asm:asm-debug-all:6.0_BETA' | ||
plugins { | ||
id 'zencode-common' | ||
id 'zencode-publish' | ||
} | ||
|
||
def javaScriptingProjects = [':JavaIntegration', ':JavaAnnotations', ':JavaBytecodeCompiler', ':JavaShared', ':Validator', ':Parser', ':CodeModel', ':Shared'] | ||
jar { | ||
dependsOn javaScriptingProjects.collect { it + ":compileJava" } | ||
from files(javaScriptingProjects.collect { project(it).sourceSets.main.output }) | ||
} | ||
sourcesJar { | ||
from files(javaScriptingProjects.collect { project(it).sourceSets.main.allSource }) | ||
} | ||
//install { | ||
// repositories.mavenInstaller { | ||
// pom.artifactId = 'zencode-javascripting' | ||
// } | ||
//} | ||
|
||
dependencies { | ||
implementation libs.asm.debug | ||
javaScriptingProjects.each { | ||
outputJava project(path: it, configuration: 'outputJava') | ||
outputResources project(path: it, configuration: 'outputResources') | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,8 @@ | ||
// Note: "common.gradle" in the root project contains additional initialization | ||
// for this project. This initialization is applied in the "build.gradle" | ||
// of the root project. | ||
|
||
// NetBeans will automatically add "run" and "debug" tasks relying on the | ||
// "mainClass" property. You may however define the property prior executing | ||
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument. | ||
// | ||
// Note however, that you may define your own "run" and "debug" task if you | ||
// prefer. In this case NetBeans will not add these tasks but you may rely on | ||
// your own implementation. | ||
if (!hasProperty('mainClass')) { | ||
ext.mainClass = '' | ||
plugins { | ||
id 'zencode-common' | ||
id 'zencode-publish' | ||
} | ||
|
||
dependencies { | ||
api project(':CodeModel') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,4 @@ pipeline { | |
} | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
archiveArtifacts '*/build/libs/**.jar' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,4 @@ | ||
// Note: "common.gradle" in the root project contains additional initialization | ||
// for this project. This initialization is applied in the "build.gradle" | ||
// of the root project. | ||
|
||
// NetBeans will automatically add "run" and "debug" tasks relying on the | ||
// "mainClass" property. You may however define the property prior executing | ||
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument. | ||
// | ||
// Note however, that you may define your own "run" and "debug" task if you | ||
// prefer. In this case NetBeans will not add these tasks but you may rely on | ||
// your own implementation. | ||
if (!hasProperty('mainClass')) { | ||
ext.mainClass = '' | ||
} | ||
|
||
dependencies { | ||
// TODO: Add dependencies here | ||
// but note that JUnit should have already been added in parent.gradle. | ||
// By default, only the Maven Central Repository is specified in | ||
// parent.gradle. | ||
// | ||
// You can read more about how to add dependency here: | ||
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:how_to_declare_your_dependencies | ||
} | ||
plugins { | ||
id 'zencode-common' | ||
id 'zencode-publish' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +0,0 @@ | ||
apply plugin: 'base' // To add "clean" task to the root project. | ||
|
||
subprojects { | ||
apply from: rootProject.file('common.gradle') | ||
} | ||
|
||
task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') { | ||
title = 'All modules' | ||
destinationDir = new File(project.buildDir, 'merged-javadoc') | ||
|
||
// Note: The closures below are executed lazily. | ||
source { | ||
subprojects*.sourceSets*.main*.allSource | ||
} | ||
classpath.from { | ||
subprojects*.configurations*.compile*.copyRecursive({ !(it instanceof ProjectDependency) })*.resolve() | ||
} | ||
} | ||
|
||
dependencies { | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import java.nio.charset.StandardCharsets | ||
|
||
plugins { | ||
id 'java-library' | ||
} | ||
|
||
String branchName = (System.getenv('BRANCH_NAME') ?: 'master').replaceAll('[^A-Za-z-_0-9]', '_') | ||
if (!branchName.equalsIgnoreCase('master')) { | ||
version = branchName + '-' + version | ||
} | ||
|
||
if (System.getenv('BUILD_NUMBER') != null) { | ||
version += '.' + System.getenv('BUILD_NUMBER') | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(8) | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
configurations { | ||
outputJava { | ||
canBeResolved = true | ||
canBeConsumed = true | ||
} | ||
outputResources { | ||
canBeResolved = true | ||
canBeConsumed = true | ||
} | ||
} | ||
|
||
artifacts { | ||
outputJava sourceSets.main.java.sourceDirectories.singleFile | ||
outputResources sourceSets.main.resources.sourceDirectories.singleFile | ||
} | ||
|
||
tasks.named('compileJava', JavaCompile) { | ||
dependsOn(configurations.outputJava) | ||
source(configurations.outputJava) | ||
} | ||
|
||
processResources { | ||
dependsOn(configurations.outputResources) | ||
from(configurations.outputResources) | ||
} | ||
|
||
tasks.named('javadoc', Javadoc) { | ||
dependsOn(configurations.outputJava) | ||
source(configurations.outputJava) | ||
options { | ||
encoding = StandardCharsets.UTF_8 | ||
if (it instanceof StandardJavadocDocletOptions) { | ||
(it as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") | ||
} | ||
} | ||
} | ||
|
||
tasks.named('sourcesJar', Jar) { | ||
dependsOn(configurations.outputJava) | ||
from(configurations.outputJava) | ||
dependsOn(configurations.outputResources) | ||
from(configurations.outputResources) | ||
} |
Oops, something went wrong.