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
417repositories {
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
2534sourceSets {
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