Skip to content

Commit f65f799

Browse files
ritvikraomatthiasdienerrbuch
authored
fix projections build (#149)
Co-authored-by: Matthias Diener <mdiener@illinois.edu> Co-authored-by: Ronak Buch <ronakbuch@gmail.com>
1 parent 9dabd10 commit f65f799

3 files changed

Lines changed: 45 additions & 33 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @rbuch
1+
* @ritvikrao

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
java: [8, 11, 15]
16+
java: [24]
1717
os: [ubuntu-latest, macos-latest]
1818
steps:
1919
- uses: actions/checkout@v2

build.gradle

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1-
apply plugin: 'java'
2-
apply plugin: 'application'
1+
plugins {
2+
id 'java'
3+
id 'application'
4+
}
5+
6+
application {
7+
mainClass = 'projections.analysis.ProjMain'
8+
}
9+
10+
java {
11+
sourceCompatibility = 1.8
12+
targetCompatibility = 1.8
13+
}
14+
15+
version = '6.10.0'
316

417
repositories {
518
mavenCentral()
@@ -17,10 +30,6 @@ dependencies {
1730
implementation 'org.jfree:jfreechart:1.5.0'
1831
}
1932

20-
mainClassName = 'projections.analysis.ProjMain'
21-
sourceCompatibility = 1.8
22-
targetCompatibility = 1.8
23-
version = '6.10.0'
2433

2534
sourceSets {
2635
main {
@@ -30,36 +39,39 @@ sourceSets {
3039
}
3140
}
3241

33-
task fatJar(type: Jar) {
34-
manifest {
35-
attributes 'Implementation-Title': 'Projections',
36-
'Implementation-Version': project.version
37-
}
38-
project.archivesBaseName = 'projections-all'
39-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
42+
tasks.register('fatJar', Jar) {
43+
archiveBaseName.set('projections-all')
44+
archiveVersion.set(project.version.toString())
45+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
4046

41-
from {
42-
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
43-
}
47+
manifest {
48+
attributes(
49+
'Implementation-Title': 'Projections',
50+
'Implementation-Version': project.version
51+
)
52+
}
4453

45-
into ('projections/images') {
46-
from('src/projections/images') {
47-
include '*'
48-
}
49-
}
54+
from {
55+
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
56+
}
5057

51-
into ('META-INF/services/') {
52-
from ('src/projections/resources') {
53-
include 'org.freehep.graphicsbase.util.export.ExportFileType'
58+
into('projections/images') {
59+
from('src/projections/images') {
60+
include '*'
61+
}
5462
}
55-
}
5663

57-
with jar
58-
}
64+
into('META-INF/services/') {
65+
from('src/projections/resources') {
66+
include 'org.freehep.graphicsbase.util.export.ExportFileType'
67+
}
68+
}
5969

60-
task copyJarToBin(type: Copy) {
61-
from fatJar
62-
into 'bin/'
63-
rename 'projections-all-' + version + '.jar', 'projections.jar'
70+
with tasks.jar
6471
}
6572

73+
tasks.register('copyJarToBin', Copy) {
74+
from(tasks.named('fatJar'))
75+
into('bin/')
76+
rename { 'projections.jar' }
77+
}

0 commit comments

Comments
 (0)