-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
157 lines (127 loc) · 4.53 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
plugins {
id 'java'
id 'groovy'
id 'maven-publish'
id 'application'
id 'signing'
id 'pmd' //code check, working on source code
id "com.github.spotbugs" version "6.1.0" //code check, working on byte code
id "com.diffplug.spotless" version "7.0.2" //code format
id 'com.github.onslip.gradle-one-jar' version '1.1.0' // pack a self contained jar
id 'org.openjfx.javafxplugin' version '0.1.0' // java 11 javafx plugin for gradle
id 'jacoco' // java code coverage plugin
id "org.sonarqube" version "6.0.1.5171" // sonarqube
id "com.github.johnrengelman.shadow" version "7.1.2" // fat jar
}
ext {
//version (changing these should be considered thoroughly!)
javaVersion = JavaVersion.VERSION_11
jtsVersion = '1.20.0'
javaFxVersion = '15-ea+1'
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
}
group = 'com.github.ie3-institute'
description = 'NetPad++'
version = '0.2-SNAPSHOT'
mainClassName = 'edu.ie3.netpad.main.IntelliJMainLauncher'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
apply from: scriptsLocation + 'tests.gradle'
apply from: scriptsLocation + 'pmd.gradle'
apply from: scriptsLocation + 'spotbugs.gradle'
apply from: scriptsLocation + 'spotless.gradle'
apply from: scriptsLocation + 'checkJavaVersion.gradle'
apply from: scriptsLocation + 'sonarqube.gradle'
apply from: scriptsLocation + 'jacoco.gradle'
apply from: scriptsLocation + 'mavenCentralPublish.gradle'
repositories {
mavenCentral()
maven { url "https://jitpack.io" } // allows for github repos as dependencies
maven { url 'https://oss.sonatype.org/service/local/repositories/snapshots/content' } // snapshot artifacts
}
dependencies {
constraints {
implementation( 'junit:junit:4.13.2+'){
because "CVE-2020-15250 - Temporary folder vulnerability - https://github.com/advisories/GHSA-269g-pwp5-87pp"
}
}
// ie³ github repository
implementation ('com.github.ie3-institute:PowerSystemDataModel:2.1.0') {
/* Exclude nested logging and ie³ related dependencies */
exclude group: 'org.slf4j'
exclude group: 'com.github.ie3-institute'
}
implementation ('com.github.ie3-institute:PowerSystemUtils:1.6') {
/* Exclude nested logging and ie³ related dependencies */
exclude group: 'org.slf4j'
exclude group: 'com.github.ie3-institute'
}
// Quantities
implementation 'tech.units:indriya:2.2.2'
// JTS
implementation ("org.locationtech.jts:jts-core:${jtsVersion}"){
exclude group: 'junit', module: 'junit'
}
implementation "org.locationtech.jts.io:jts-io-common:${jtsVersion}"
// gluon hq
implementation 'com.gluonhq:maps:2.0.0-ea+3'
implementation 'com.gluonhq.attach:util:4.0.19'
implementation 'com.gluonhq.attach:storage:4.0.7:desktop'
// JGraphT
implementation 'org.jgrapht:jgrapht-core:1.5.2'
implementation 'org.jgrapht:jgrapht-ext:1.5.2'
// javafx
implementation "org.openjfx:javafx-fxml:$javaFxVersion"
implementation "org.openjfx:javafx-swing:$javaFxVersion"
implementation "org.openjfx:javafx-graphics:$javaFxVersion"
implementation "org.openjfx:javafx-web:$javaFxVersion"
implementation 'org.controlsfx:controlsfx:11.2.1'
// Apache POI
implementation 'org.apache.poi:poi-ooxml:5.4.0'
//implementation 'org.apache.commons:commons-lang3:3.12.0'
// rx java
implementation 'io.reactivex:rxjava:1.3.8'
// logging
implementation 'org.slf4j:slf4j-api:2.0.16' // slf4j wrapper
implementation 'com.lmax:disruptor:3.4.4' //async logging
implementation platform('org.apache.logging.log4j:log4j-bom:2.24.3')
implementation 'org.apache.logging.log4j:log4j-api' // log4j
implementation 'org.apache.logging.log4j:log4j-core' // log4j
implementation 'org.apache.logging.log4j:log4j-slf4j-impl' // log4j -> slf4j
// testing
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'
testImplementation 'cglib:cglib-nodep:3.3.0' //enables mocking of classes (in addition to interfaces)
implementation 'org.mockito:mockito-core:5.15.2' //mocking framework
// pbf parser //
implementation 'com.github.johanneshiry:OSMonaut:v1.1.1'
}
wrapper {
gradleVersion = '7.2'
}
javafx {
version = javaFxVersion
// corresponding javafx modules
modules = [
'javafx.controls',
'javafx.fxml',
'javafx.swing',
'javafx.graphics',
'javafx.web'
]
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task printVersion {
doLast {
println project.version
}
}
shadowJar {
transform(AppendingTransformer) {
resource = 'reference.conf'
}
zip64 = true
}