-
Notifications
You must be signed in to change notification settings - Fork 54
/
build.gradle
179 lines (150 loc) · 5.17 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
plugins {
id 'application'
id 'java'
id 'maven-publish'
id 'org.openjfx.javafxplugin' version '0.0.7'
//id 'net.nemerosa.versioning' version '2.8.2'
id 'com.jfrog.bintray' version '1.8.4'
}
sourceCompatibility = '11'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
//apply from: 'http://gradle-plugins.mihosoft.eu/latest/vlicenseheader.gradle'
//repairHeaders.licenseHeaderText = new File(projectDir,'./license-template.txt')
wrapper {
gradleVersion = '6.4'
}
if (!hasProperty('mainClass')) {
ext.mainClass = 'eu.mihosoft.vrl.v3d.Main'
}
applicationDefaultJvmArgs = ["-Xss515m"]
mainClassName = mainClass
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
// javadoc is way too strict for my taste.
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption("encoding", "UTF-8")
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// create one jar for the source files
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
// compile group: 'eu.mihosoft.ext.org.fxyz', name: 'extfxyz', version: '0.4'
//compile group: 'eu.mihosoft.ext.org.fxyz', name: 'extfxyz', version: '0.4', classifier: 'sources'
compile group: 'eu.mihosoft.vvecmath', name: 'vvecmath', version: '0.3.8'
compile group: 'eu.mihosoft.vvecmath', name: 'vvecmath', version: '0.3.8', classifier: 'sources'
compile 'org.slf4j:slf4j-simple:1.6.1'
}
Date buildTimeAndDate = new Date()
ext {
buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}
// create a fat-jar (class files plus dependencies
// excludes VRL.jar (plugin jar files must not start with 'vrl-\\d+')
jar {
// TODO add switch for fat-jar generation
// dependencies except VRL
// from configurations.runtime.asFileTree.
// filter({file->return !file.name.startsWith("vrl-0")}).
// files.collect { zipTree(it) }
//
// // project class files compiled from source
// from files(sourceSets.main.output)
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
//'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Automatic-Module-Name': "eu.mihosoft.jcsg"
)
}
}
javafx {
modules = [ 'javafx.graphics', 'javafx.fxml']
}
test {
maxHeapSize = '2G'
}
def pomConfig = {
name 'jcsg'
description 'Java implementation of BSP based CSG (Constructive Solid Geometry)'
url 'https://github.com/miho/JCSG/wiki'
inceptionYear '2016'
licenses {
license([:]) {
name 'BSD 2-Clause'
url 'https://github.com/miho/JCSG/blob/master/LICENSE.txt'
distribution 'repo'
}
}
scm {
url 'scm:git@github.com:miho/JCSG.git'
connection 'scm:git@github.com:miho/JCSG.git'
developerConnection 'scm:git@github.com:miho/JCSG.git'
}
developers {
developer {
id 'miho'
name 'Michael Hoffer'
}
}
}
publishing {
publications {
mavenCustom(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode 'description', 'Java implementation of BSP based CSG (Constructive Solid Geometry)'
root.children().last() + pomConfig
}
}
}
}
if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = ''
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = ''
bintray {
user = project.bintrayUsername
key = project.bintrayApiKey
publications = ['mavenCustom']
pkg {
repo = 'JCSG'
userOrg = 'miho'
name = project.name
desc = 'Java implementation of BSP based CSG (Constructive Solid Geometry)'
licenses = ['BSD 2-Clause']
labels = ['javafx', 'java', 'CSG', 'Constructive Solid Geometry', 'VRL', '3D', 'STL', 'OBJ']
websiteUrl = 'https://github.com/miho/JCSG/wiki'
issueTrackerUrl = 'https://github.com/miho/JCSG/issues'
vcsUrl = 'git@github.com:miho/JCSG.git'
publicDownloadNumbers = true
}
}