Skip to content

Commit ec43160

Browse files
committed
Move to buildSrc plugins instead of subProjects
Use version catalogues to keep versions in sync Update to gradle 8.8
1 parent a024ca3 commit ec43160

File tree

26 files changed

+357
-392
lines changed

26 files changed

+357
-392
lines changed

CodeModel/build.gradle

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
// Note: "common.gradle" in the root project contains additional initialization
2-
// for this project. This initialization is applied in the "build.gradle"
3-
// of the root project.
4-
5-
// NetBeans will automatically add "run" and "debug" tasks relying on the
6-
// "mainClass" property. You may however define the property prior executing
7-
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
8-
//
9-
// Note however, that you may define your own "run" and "debug" task if you
10-
// prefer. In this case NetBeans will not add these tasks but you may rely on
11-
// your own implementation.
12-
if (!hasProperty('mainClass')) {
13-
ext.mainClass = ''
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
144
}
155

166
dependencies {

JavaAnnotations/build.gradle

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
// Note: "common.gradle" in the root project contains additional initialization
2-
// for this project. This initialization is applied in the "build.gradle"
3-
// of the root project.
4-
5-
// NetBeans will automatically add "run" and "debug" tasks relying on the
6-
// "mainClass" property. You may however define the property prior executing
7-
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
8-
//
9-
// Note however, that you may define your own "run" and "debug" task if you
10-
// prefer. In this case NetBeans will not add these tasks but you may rely on
11-
// your own implementation.
12-
if (!hasProperty('mainClass')) {
13-
ext.mainClass = ''
14-
}
15-
16-
dependencies {
17-
// no dependencies
18-
}
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
4+
}

JavaBytecodeCompiler/build.gradle

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
// Note: "common.gradle" in the root project contains additional initialization
2-
// for this project. This initialization is applied in the "build.gradle"
3-
// of the root project.
4-
5-
// NetBeans will automatically add "run" and "debug" tasks relying on the
6-
// "mainClass" property. You may however define the property prior executing
7-
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
8-
//
9-
// Note however, that you may define your own "run" and "debug" task if you
10-
// prefer. In this case NetBeans will not add these tasks but you may rely on
11-
// your own implementation.
12-
if (!hasProperty('mainClass')) {
13-
ext.mainClass = ''
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
144
}
155

166
dependencies {
17-
api group: 'org.ow2.asm', name: 'asm', version: '9.3'
18-
api group: 'org.ow2.asm', name: 'asm-commons', version: '9.3'
7+
api libs.asm
8+
api libs.asm.commons
199
api project(':CodeModel')
2010
api project(':JavaShared')
2111
}

JavaIntegration/build.gradle

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
// Note: "common.gradle" in the root project contains additional initialization
2-
// for this project. This initialization is applied in the "build.gradle"
3-
// of the root project.
4-
5-
// NetBeans will automatically add "run" and "debug" tasks relying on the
6-
// "mainClass" property. You may however define the property prior executing
7-
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
8-
//
9-
// Note however, that you may define your own "run" and "debug" task if you
10-
// prefer. In this case NetBeans will not add these tasks but you may rely on
11-
// your own implementation.
12-
if (!hasProperty('mainClass')) {
13-
ext.mainClass = ''
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
144
}
155

166
dependencies {

JavaScripting/build.gradle

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
repositories {
2-
mavenCentral()
3-
}
4-
5-
dependencies {
6-
implementation 'org.ow2.asm:asm-debug-all:6.0_BETA'
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
74
}
85

96
def javaScriptingProjects = [':JavaIntegration', ':JavaAnnotations', ':JavaBytecodeCompiler', ':JavaShared', ':Validator', ':Parser', ':CodeModel', ':Shared']
10-
jar {
11-
dependsOn javaScriptingProjects.collect { it + ":compileJava" }
12-
from files(javaScriptingProjects.collect { project(it).sourceSets.main.output })
13-
}
14-
sourcesJar {
15-
from files(javaScriptingProjects.collect { project(it).sourceSets.main.allSource })
16-
}
17-
//install {
18-
// repositories.mavenInstaller {
19-
// pom.artifactId = 'zencode-javascripting'
20-
// }
21-
//}
7+
8+
dependencies {
9+
implementation libs.asm.debug
10+
javaScriptingProjects.each {
11+
outputJava project(path: it, configuration: 'outputJava')
12+
outputResources project(path: it, configuration: 'outputResources')
13+
}
14+
}

JavaScripting/configuration.gradle

Lines changed: 0 additions & 2 deletions
This file was deleted.

JavaShared/build.gradle

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
// Note: "common.gradle" in the root project contains additional initialization
2-
// for this project. This initialization is applied in the "build.gradle"
3-
// of the root project.
4-
5-
// NetBeans will automatically add "run" and "debug" tasks relying on the
6-
// "mainClass" property. You may however define the property prior executing
7-
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
8-
//
9-
// Note however, that you may define your own "run" and "debug" task if you
10-
// prefer. In this case NetBeans will not add these tasks but you may rely on
11-
// your own implementation.
12-
if (!hasProperty('mainClass')) {
13-
ext.mainClass = ''
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
144
}
155

166
dependencies {
177
api project(':CodeModel')
18-
}
8+
}

Jenkinsfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,4 @@ pipeline {
2020
}
2121
}
2222
}
23-
24-
post {
25-
always {
26-
archiveArtifacts '*/build/libs/**.jar'
27-
}
28-
}
2923
}

Parser/build.gradle

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
// Note: "common.gradle" in the root project contains additional initialization
2-
// for this project. This initialization is applied in the "build.gradle"
3-
// of the root project.
4-
5-
// NetBeans will automatically add "run" and "debug" tasks relying on the
6-
// "mainClass" property. You may however define the property prior executing
7-
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
8-
//
9-
// Note however, that you may define your own "run" and "debug" task if you
10-
// prefer. In this case NetBeans will not add these tasks but you may rely on
11-
// your own implementation.
12-
if (!hasProperty('mainClass')) {
13-
ext.mainClass = ''
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
144
}
155

166
dependencies {

ScriptingEngineTester/build.gradle

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
plugins {
2-
id 'java'
3-
}
4-
5-
group 'org.example'
6-
version 'unspecified'
7-
8-
repositories {
9-
mavenCentral()
2+
id 'zencode-common'
103
}
114

125
dependencies {
136
api project(':Shared')
14-
implementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
15-
implementation 'org.junit.platform:junit-platform-engine:1.9.0'
16-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
7+
implementation libs.jupiter.api
8+
implementation libs.junit.platform.engine
9+
testRuntimeOnly libs.jupiter.engine
1710
}
1811

1912
test {

0 commit comments

Comments
 (0)