Skip to content

Commit 0323fa5

Browse files
authored
Merge pull request #113 from CEGRcode/working-dev
upgrade Gradle to 7.5 for Java 17 Closing with #110 and #112
2 parents 273e01d + fa33ea1 commit 0323fa5

File tree

201 files changed

+1011
-916
lines changed

Some content is hidden

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

201 files changed

+1011
-916
lines changed

.classpath

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5-
<classpathentry kind="lib" path="lib/jcommon-1.0.21.jar"/>
6-
<classpathentry kind="lib" path="lib/jfreechart-1.0.17.jar"/>
7-
<classpathentry kind="lib" path="lib/jfreesvg-3.0.jar"/>
8-
<classpathentry kind="lib" path="lib/picard.jar"/>
9-
<classpathentry kind="output" path="bin"/>
3+
<classpathentry kind="src" output="bin/main" path="src/main/resources">
4+
<attributes>
5+
<attribute name="gradle_scope" value="main"/>
6+
<attribute name="gradle_used_by_scope" value="main,test"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="src" output="bin/test" path="src/test/java">
10+
<attributes>
11+
<attribute name="gradle_scope" value="test"/>
12+
<attribute name="gradle_used_by_scope" value="test"/>
13+
<attribute name="test" value="true"/>
14+
</attributes>
15+
</classpathentry>
16+
<classpathentry kind="src" output="bin/test" path="src/test/resources">
17+
<attributes>
18+
<attribute name="gradle_scope" value="test"/>
19+
<attribute name="gradle_used_by_scope" value="test"/>
20+
<attribute name="test" value="true"/>
21+
</attributes>
22+
</classpathentry>
23+
<classpathentry kind="src" output="bin/main" path="src/main/java">
24+
<attributes>
25+
<attribute name="gradle_scope" value="main"/>
26+
<attribute name="gradle_used_by_scope" value="main,test"/>
27+
</attributes>
28+
</classpathentry>
29+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
30+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
31+
<classpathentry kind="output" path="bin/default"/>
1032
</classpath>

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
strategy:
2626
matrix:
27-
java_version: ['11']
27+
java_version: ['11', '17']
2828
os: [ ubuntu-latest, windows-latest, macOS-latest ]
2929

3030
steps:

.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
</projects>
77
<buildSpec>
88
<buildCommand>
9-
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
1010
<arguments>
1111
</arguments>
1212
</buildCommand>
1313
<buildCommand>
14-
<name>org.eclipse.jdt.core.javabuilder</name>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
1515
<arguments>
1616
</arguments>
1717
</buildCommand>

build.gradle

Lines changed: 46 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,60 @@
1-
// gradle 4.3
2-
3-
apply plugin: 'java'
4-
//apply plugin: 'checkstyle'
5-
//apply plugin: 'findbugs'
6-
//apply plugin: 'pmd'
7-
apply plugin: 'application'
8-
apply plugin: 'eclipse'
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*
4+
* This generated file contains a sample Java Library project to get you started.
5+
* For more details take a look at the Java Libraries chapter in the Gradle
6+
* User Manual available at https://docs.gradle.org/7.5/userguide/java_library_plugin.html
7+
*/
8+
9+
//
10+
plugins {
11+
// Apply the java-library plugin to add support for Java Library
12+
id 'java-library'
13+
id 'java'
14+
id 'eclipse'
15+
id 'application'
16+
// id 'pmd'
17+
// id 'checkstyle'
18+
id 'com.github.johnrengelman.shadow' version '7.1.2'
19+
}
920

10-
sourceSets.main.java.srcDirs = ['src']
11-
mainClassName = "main.ScriptManager"
21+
mainClassName = "scriptmanager.main.ScriptManager"
1222
version = 'v0.14-dev'
23+
1324
sourceCompatibility = 1.8
1425
targetCompatibility = 1.8
1526

16-
// Gradle builds for dev
17-
jar {
18-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
19-
20-
baseName = "ScriptManager"
21-
22-
manifest {
23-
attributes 'ScriptManager-Title': baseName,
24-
'ScriptManager-Version': version,
25-
'Main-Class': mainClassName
26-
}
27-
}
28-
29-
// Create a single JAR with all dependencies bundles - for production deployment
30-
task fatJar(type: Jar) {
31-
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
32-
33-
manifest {
34-
attributes 'ScriptManager-Title': 'Gradle jar of ScriptManager',
35-
'ScriptManager-Version': version,
36-
'Main-Class': mainClassName
37-
}
38-
39-
baseName = 'ScriptManager' + version
40-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
41-
with jar
42-
}
43-
4427
// Get dependencies from Maven central repository
4528
repositories {
29+
// Use jcenter for resolving dependencies.
30+
//jcenter()
31+
// You can declare any Maven/Ivy/file repository here.
4632
mavenCentral()
4733
}
4834

4935
// Declare the dependencies for your production and test code
5036
dependencies {
51-
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.13'
52-
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
53-
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.1'
54-
// https://mvnrepository.com/artifact/info.picocli/picocli #CommandLineInterface Parsing Args
55-
compile group: 'info.picocli', name: 'picocli', version: '4.2.0'
56-
compile group: 'org.jfree', name: 'jfreechart', version: '1.5.3'
57-
compile group: 'org.jfree', name: 'jfreesvg', version: '3.4.2'
58-
testCompile group: 'junit', name: 'junit', version: '4.12'
59-
compile fileTree(dir: 'lib', include: ['*.jar'])
60-
}
37+
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.13'
38+
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
39+
implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.1'
40+
// https://mvnrepository.com/artifact/info.picocli/picocli #CommandLineInterface Parsing Args
41+
implementation group: 'info.picocli', name: 'picocli', version: '4.2.0'
42+
implementation group: 'org.jfree', name: 'jfreechart', version: '1.5.3'
43+
implementation group: 'org.jfree', name: 'jfreesvg', version: '3.4.2'
44+
implementation fileTree(dir: 'lib', include: ['*.jar'])
45+
}
46+
47+
// Declare dependencies explicitly (for Gradle 7.X with Shadow)
48+
tasks.shadowJar.dependsOn ':distTar'
49+
tasks.shadowJar.dependsOn ':distZip'
50+
51+
// Build fat jar executable with all dependencies bundled together
52+
shadowJar {
53+
// Configure JAR file name
54+
archiveBaseName.set('ScriptManager')
55+
archiveClassifier.set('')
56+
archiveVersion.set(version)
6157

62-
uploadArchives {
63-
repositories {
64-
flatDir {
65-
dirs 'repos'
66-
}
67-
}
58+
// Reduce fat jar to only include dependencies used
59+
minimize()
6860
}

gradle/wrapper/gradle-wrapper.jar

6.69 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
4+
networkTimeout=10000
35
zipStoreBase=GRADLE_USER_HOME
46
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip

0 commit comments

Comments
 (0)