Skip to content

Commit 9d30236

Browse files
authored
Merge pull request #186 from ZenCodeLang/feature/refactor-gradle
Update gradle scripts and archive old projects
2 parents 3746fcf + 7f7f815 commit 9d30236

File tree

388 files changed

+365
-387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+365
-387
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: 3 additions & 17 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
1+
plugins {
2+
id 'zencode-common'
3+
id 'zencode-publish'
184
}

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: 10 additions & 17 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 })
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+
}
1614
}
17-
//install {
18-
// repositories.mavenInstaller {
19-
// pom.artifactId = 'zencode-javascripting'
20-
// }
21-
//}

JavaScripting/configuration.gradle

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

JavaShared/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 {

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: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
plugins {
2-
id 'java'
2+
id 'zencode-common'
33
}
44

5-
group 'org.example'
6-
version 'unspecified'
7-
8-
repositories {
9-
mavenCentral()
5+
configurations {
6+
stdLibs {
7+
canBeResolved = true
8+
}
109
}
1110

1211
dependencies {
1312
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'
13+
implementation libs.jupiter.api
14+
implementation libs.junit.platform.engine
15+
testRuntimeOnly libs.jupiter.engine
16+
17+
stdLibs project(path: ":StdLibs", configuration: "zip")
18+
}
19+
20+
processTestResources {
21+
dependsOn(configurations.stdLibs)
22+
from(configurations.stdLibs)
1723
}
1824

1925
test {
2026
useJUnitPlatform()
21-
}
27+
}

0 commit comments

Comments
 (0)