-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
114 lines (92 loc) · 4.01 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
plugins {
id 'java' //java support
id 'groovy' // groovy support
id 'maven-publish'
id 'signing'
id 'pmd' // code check, working on source code
id 'com.diffplug.spotless' version '6.25.0' //code format
id 'com.github.spotbugs' version '6.0.26' // code check, working on byte code
id 'de.undercouch.download' version '5.6.0'
id 'kr.motd.sphinx' version '2.10.1' // documentation generation
id 'jacoco' // java code coverage plugin
id "org.sonarqube" version "6.0.1.5171" // sonarqube
id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning
}
ext {
//version (changing these should be considered thoroughly!)
javaVersion = JavaVersion.VERSION_17
groovyVersion = "4.0"
groovyBinaryVersion = "4.0.24"
testcontainersVersion = '1.20.4'
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
}
group = 'com.github.ie3-institute'
description = 'PowerSystemDataModel'
java {
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 + 'documentation.gradle'
apply from: scriptsLocation + 'jacoco.gradle' // jacoco java code coverage
apply from: scriptsLocation + 'mavenCentralPublish.gradle'
apply from: scriptsLocation + 'sonarqube.gradle'
apply from: scriptsLocation + 'vcs.gradle'
apply from: scriptsLocation + 'semVer.gradle'
repositories {
mavenCentral() // searches in Sonatype's repository 'Maven Central'
// sonatype snapshot repo
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
// ie³ power system utils
implementation 'com.github.ie3-institute:PowerSystemUtils:2.2.1'
implementation 'tech.units:indriya:2.2.1'
// JTS Topology Suite for GeoPositions, License: EPL 1.0 / EDL 1.0
implementation ('org.locationtech.jts:jts-core:1.20.0'){
exclude group: 'junit', module: 'junit'
}
implementation 'org.locationtech.jts.io:jts-io-common:1.20.0'
// Graphs
implementation 'org.jgrapht:jgrapht-core:1.5.2'
// testing
testImplementation "org.apache.groovy:groovy:$groovyBinaryVersion"
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3'
testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion"
testImplementation 'org.objenesis:objenesis:3.4' // Mock creation with constructor parameters
testImplementation 'net.bytebuddy:byte-buddy:1.15.10' // Mocks of classes
// testcontainers (docker framework for testing)
testImplementation "org.testcontainers:testcontainers:$testcontainersVersion"
testImplementation "org.testcontainers:spock:$testcontainersVersion"
testImplementation "org.testcontainers:influxdb:$testcontainersVersion"
testImplementation "org.testcontainers:postgresql:$testcontainersVersion"
testImplementation "org.testcontainers:couchbase:$testcontainersVersion"
// logging
implementation platform('org.apache.logging.log4j:log4j-bom:2.24.2')
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
// Databases
implementation 'org.influxdb:influxdb-java:2.24'
implementation 'com.couchbase.client:java-client:3.7.5'
runtimeOnly 'org.postgresql:postgresql:42.7.4' // postgresql jdbc driver required during runtime
implementation 'commons-io:commons-io:2.18.0' // I/O functionalities
implementation 'commons-codec:commons-codec:1.17.1' // needed by commons-compress
implementation 'org.apache.commons:commons-compress:1.27.1' // I/O functionalities
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc){
options.encoding = 'UTF-8'
failOnError = false // TODO: Temp until JavaDoc issues are resolved
}
task printVersion {
doLast {
println project.version
}
}