-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
83 lines (67 loc) · 2.2 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
plugins {
id "java"
id "application"
}
repositories {
mavenCentral()
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
resources.srcDir file('src/integration-test/resources')
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
dependencies {
implementation 'org.slf4j:slf4j-simple:1.7.36'
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'org.jetbrains:annotations:23.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
integrationTestCompile group: 'junit', name: 'junit', version: '4.13.2'
integrationTestCompile 'org.slf4j:slf4j-api:1.7.36'
integrationTestCompile 'org.slf4j:slf4j-simple:1.7.36'
integrationTestCompile 'com.moandjiezana.toml:toml4j:0.7.2'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
project.version = "4.10.0" //remember to change version in main class
archivesBaseName = "MGT2_Mod_Tool"
group = "com.github.lmh01"
application.mainClassName = "com.github.lmh01.mgt2mt.MadGamesTycoon2ModTool"
// required so jar task includes dependencies
jar {
manifest {
attributes "Main-Class": application.mainClassName
}
archiveVersion = ""
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task createZip(type: Zip, group: 'build') {
dependsOn jar
from tasks.jar.archivePath
from ('assets')
destinationDirectory = new File("build/releases")
archiveFileName = "MGT2_Mod_Tool_${project.version}.zip"
}
task integrationTest(type: Test, group: 'verification') {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}
compileJava {options.encoding = "UTF-8"}
test {
useJUnitPlatform()
}
check.dependsOn integrationTest
integrationTest.mustRunAfter test