forked from roborescue/adf-core-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·116 lines (96 loc) · 2.51 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
plugins {
id 'java-library'
id 'maven-publish'
}
defaultTasks 'build'
group = 'com.github.roborescue'
sourceCompatibility = '17'
targetCompatibility = '17'
version = '4.0'
def getDateTime() {
new Date().format('yyyyMMddHHmmss', TimeZone.getTimeZone('UTC'))
}
dependencies {
implementation 'com.github.roborescue:rcrs-server:v2.0'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.0'
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.google.common:google-collect:0.5'
implementation 'javax.activation:activation:1.1.1'
implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
implementation 'log4j:log4j:1.2.17'
implementation 'org.msgpack:jackson-dataformat-msgpack:0.9.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
repositories {
mavenCentral()
maven {
url = 'https://sourceforge.net/projects/jsi/files/m2_repo'
}
maven {
url = 'https://repo.enonic.com/public/'
}
maven {
url 'https://jitpack.io'
}
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes 'Main-Class': 'adf.core.Main'
attributes 'Build-Timestamp': getDateTime();
}
archiveFileName = 'adf-core.jar'
}
javadoc {
options {
encoding = 'UTF-8'
addStringOption('Xdoclint:none', '-quiet')
}
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'com.github.roborescue'
artifactId = 'adf-core'
version = 'master-SNAPSHOT'
from components.java
}
}
}
clean{
doFirst {
delete file( new File( rootDir, 'bin' ) )
delete file( new File( rootDir, 'build' ) )
}
}
[compileJava, compileTestJava].each {
it.options.encoding = 'UTF-8'
it.options.compilerArgs += [ '-Xlint:unchecked', '-Xlint:deprecation' ]
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
archiveFileName = 'adf-core-javadoc.jar'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
archiveFileName = 'adf-core-sources.jar'
}
artifacts {
archives sourcesJar
archives javadocJar
}
task start (type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'adf.core.Main'
if (project.hasProperty('args')) {
args project.args.split('\\s+')
}
jvmArgs '-Xms512m', '-Xmx8g'
}