-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathbuild.gradle
209 lines (185 loc) · 5.73 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
import java.text.SimpleDateFormat;
def jkind_version_base = '4.6.0'
def buildTime() {
def df = new SimpleDateFormat("yyyyMMddHHmm");
df.setTimeZone(TimeZone.getTimeZone("UTC"))
return df.format(new Date())
}
// Compute version number to be included in manifest, code, and publishing
def match = jkind_version_base =~ /([0-9]+\.[0-9]\.[0-9]+).*/
def jkind_version = match[0][1]
if (jkind_version_base.matches("([0-9]+\\.[0-9]+\\.[0-9]+)-SNAPSHOT")) {
jkind_version = jkind_version + "-" + buildTime()
}
assert jkind_version ==~ /[0-9.\-]+/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.amazonaws:aws-java-sdk-core:1.11.5'
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
group = 'com.collins.trustedsystems.jkind'
dependencies {
implementation files('../jkind-common/dependencies/antlr-runtime-4.4.jar', '../jkind-common/dependencies/jxl.jar')
}
sourceSets {
main {
java {
srcDirs = ['../jkind-common/src']
}
}
}
publishing {
repositories {
maven {
name = "GithubPackages"
if (jkind_version_base.matches("([0-9]+\\.[0-9]+\\.[0-9]+)")) {
url "https://maven.pkg.github.com/loonwerks/jkind/releases/"
} else if (jkind_version_base.matches("([0-9]+\\.[0-9]+\\.[0-9]+)-SNAPSHOT")) {
url "https://maven.pkg.github.com/loonwerks/jkind/snapshots/"
} else {
url "https://maven.pkg.github.com/loonwerks/jkind/staging/"
}
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
}
project(':jkind') {
repositories {
flatDir {
dirs 'dependencies'
}
}
dependencies {
implementation files('dependencies/commons-cli-1.2.jar', 'dependencies/smtinterpol.jar')
}
sourceSets {
main {
java {
srcDirs += ['src']
}
resources {
srcDirs += ['resources']
}
}
}
jar {
manifest {
attributes 'Main-Class': 'jkind.Main',
'Bundle-Description': 'An infinite-state model checker for safety properties in Lustre',
'Bundle-License': 'https://github.com/loonwerks/jkind/blob/master/LICENSE',
'Bundle-SymbolicName': 'com.collins.trustedsystems.jkind',
'Bundle-Version': jkind_version,
'Implementation-Version': jkind_version
}
from sourceSets.main.allSource
dependsOn configurations.runtimeClasspath
from (configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }) {
exclude '.api_description'
exclude '.options'
exclude 'about.html'
exclude 'plugin.properties'
exclude 'plugin.xml'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId 'com.collins.trustedsystems.jkind'
version jkind_version
from components.java
}
}
}
}
project(':jkind-api') {
repositories {
mavenCentral()
}
dependencies {
implementation 'org.eclipse.platform:org.eclipse.equinox.common:3.14.0!!'
implementation 'org.eclipse.platform:org.eclipse.core.runtime:3.20.0!!'
}
sourceSets {
main {
java {
srcDirs += ['src']
}
resources {
srcDirs = ['resources']
}
}
}
jar {
manifest {
attributes 'Main-Class': 'jkind.Main',
'Bundle-Description': 'An infinite-state model checker for safety properties in Lustre',
'Bundle-License': 'https://github.com/loonwerks/jkind/blob/master/LICENSE',
'Bundle-SymbolicName': 'com.collins.trustedsystems.jkind-api',
'Bundle-Version': jkind_version,
'Implementation-Version': jkind_version
}
from sourceSets.main.allSource
dependsOn configurations.runtimeClasspath
from (configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }) {
exclude '.api_description'
exclude '.options'
exclude 'about.html'
exclude 'plugin.properties'
exclude 'plugin.xml'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
duplicatesStrategy = 'warn'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId 'com.collins.trustedsystems.jkind-api'
version jkind_version
from components.java
}
}
}
}
task dist(type: Zip) {
dependsOn 'jkind-api:jar', 'jkind:jar'
from ('scripts') {
include '*'
exclude '*.bat'
fileMode 0755
into 'jkind'
}
from ('scripts') {
include '*.bat'
into 'jkind'
}
from ('jkind/build/libs') {
include 'jkind.jar'
into 'jkind'
}
from ('jkind-api/build/libs') {
include 'jkind-api.jar'
into 'jkind'
}
archiveBaseName = 'jkind'
archiveVersion = jkind_version
}
artifacts {
archives dist
}