-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
173 lines (151 loc) · 4.93 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
//==============================================================================
// Gradle build file for COASTAL
//==============================================================================
plugins {
id 'application'
id 'java'
id 'eclipse'
id 'checkstyle'
id 'maven-publish'
id 'signing'
id 'com.peterabeles.gversion' version '1.5.2' // for compile-time info
}
group = 'com.github.DeepseaPlatform'
mainClassName = 'za.ac.sun.cs.coastal.COASTAL'
version = '0.2.0-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith('SNAPSHOT')
//------------------------------------------------------------------------------
// Repositories and dependencies
//------------------------------------------------------------------------------
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'https://repo.maven.apache.org/maven2' }
}
dependencies {
implementation 'com.github.green-solver:green:0.2.0'
implementation 'commons-io:commons-io:2.11.0'
implementation 'org.ow2.asm:asm:9.2'
implementation 'org.ow2.asm:asm-commons:9.2'
implementation 'org.ow2.asm:asm-util:9.2'
implementation 'com.lmax:disruptor:3.4.2'
implementation 'org.apache.logging.log4j:log4j-api:2.14.1'
implementation 'org.apache.logging.log4j:log4j-core:2.14.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.slf4j:slf4j-nop:1.7.32'
}
//------------------------------------------------------------------------------
// Settings for generation of compile-time information.
//------------------------------------------------------------------------------
gversion {
srcDir = 'src/main/java/'
classPackage = 'za.ac.sun.cs.coastal'
className = 'CompileInfo'
}
project.compileJava.dependsOn(createVersionFile)
//------------------------------------------------------------------------------
// Put the ".properties" files in the same directory as the ".class" files.
//------------------------------------------------------------------------------
sourceSets {
test {
output.resourcesDir = 'build/classes/java/test'
}
}
//------------------------------------------------------------------------------
// Chosen version of https://checkstyle.org/
//------------------------------------------------------------------------------
checkstyle {
toolVersion '8.1'
}
//------------------------------------------------------------------------------
// Fine-tuning for javadoc.
//------------------------------------------------------------------------------
javadoc {
destinationDir = file('build/docs/api')
options.docletpath = [ file('build/classes/java/main') ]
options.doclet = 'za.ac.sun.cs.coastal.utility.CoastalDoclet'
options.noQualifiers = [ 'java.lang.*', 'java.io.*', 'java.util.*', 'org.apache.*' , 'za.ac.sun.cs.coastal.' ]
options.memberLevel = JavadocMemberLevel.PRIVATE
}
//------------------------------------------------------------------------------
// Fine-tuning for installation scripts.
//------------------------------------------------------------------------------
applicationDefaultJvmArgs = [ '-ea' ]
startScripts {
doLast {
unixScript.text = unixScript.text.replace('COASTAL_APP_HOME', '\$APP_HOME')
windowsScript.text = windowsScript.text.replace('COASTAL_APP_HOME', '%~dp0..')
}
}
//------------------------------------------------------------------------------
// Publication settings
//------------------------------------------------------------------------------
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = group
pom {
name = 'COASTAL'
description = 'Concolic analysis tool for Java'
url = 'https://github.com/DeepseaPlatform/coastal'
packaging = 'jar'
organization {
name = 'DeepseaPlatform'
url = 'https://github.com/DeepseaPlatform'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/DeepseaPlatform/coastal/issues'
}
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0'
distribution = 'repo'
}
}
scm {
url = 'https://github.com/DeepseaPlatform/coastal'
connection = 'scm:git:[email protected]:DeepseaPlatform/coastal.git'
developerConnection = 'scm:git:[email protected]:DeepseaPlatform/coastal.git'
}
developers {
developer {
id = 'jacogeld'
name = 'Jaco Geldenhuys'
email = '[email protected]'
}
developer {
id = 'wvisser'
name = 'Willem Visser'
}
}
}
}
}
repositories {
maven {
credentials {
username repo_username
password repo_password
}
if (isReleaseVersion) {
// url = "file://${buildDir}/repo"
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
} else {
// url = "file://${buildDir}/snap"
url = 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}
}
signing {
if (isReleaseVersion) {
sign publishing.publications
}
}