-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
115 lines (102 loc) · 2.52 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
plugins {
id 'java-library'
id 'java'
id 'eclipse'
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
id 'net.researchgate.release' version '2.8.0'
id 'net.wooga.github' version '2.0.0-rc.2'
}
dependencies {
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile project(':parser')
implementation name: 'lib/model'
implementation name: 'uppaal'
// compile name: 'lib/freehep-graphicsbase'
testImplementation 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile "org.jetbrains.kotlin:kotlin-reflect:1.3.21"
implementation 'com.github.ajalt:clikt:2.0.0'
}
repositories {
mavenCentral()
flatDir {
dirs "$System.env.UPPAAL_ROOT"
}
maven {
url 'https://repo.eclipse.org/content/groups/releases'
}
}
sourceSets {
main {
java {
srcDir 'plugin/main/java'
}
}
}
task fatJar(type: Jar) {
dependsOn 'parser:jar'
manifest {
attributes('Uppaal-Plugin': 'nl.utwente.ewi.fmt.uppaalSMC.urpal.ui.MainUI',
'Main-Class': 'nl.utwente.ewi.fmt.uppaalSMC.urpal.cli.ApplicationKt',
'Class-Path': '../uppaal.jar')
}
archiveBaseName = "$project.name"
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
}
with jar
}
task deployLocal(type: Copy) {
dependsOn fatJar
from file("$buildDir/libs/$project.name-${project.version}.jar")
into file("$System.env.UPPAAL_ROOT/plugins")
rename { "UrPal.jar" }
}
def file() {
if (project.hasProperty("file")) {
return "$file"
}
''
}
task runUppaal(type: JavaExec, dependsOn: deployLocal) {
main = "-jar"
args "$System.env.UPPAAL_ROOT/uppaal.jar", file()
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileJava {
targetCompatibility = 1.8
}
def tokenFile = new File('.gittoken')
def deployToken = tokenFile.exists() ? tokenFile.getText().substring(0, 40) : ""
release {
failOnCommitNeeded = false
buildTasks = ['fatJar']
git {
requireBranch = ''
}
}
updateVersion.dependsOn githubPublish
githubPublish {
from {
"build/libs/$project.name-${project.version}.jar"
}
tagName {
project.version
}
}
githubPublish.dependsOn preTagCommit
github {
token deployToken
repositoryName "utwente-fmt/UrPal"
}