-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (74 loc) · 2.22 KB
/
build.gradle
File metadata and controls
87 lines (74 loc) · 2.22 KB
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
import java.time.Instant
plugins {
id 'idea'
id 'eclipse'
id 'java-library'
id 'net.nemerosa.versioning' version '2.14.0'
}
apply from: 'publish-maven.gradle'
group 'com.github.mesharel'
version '0.0.1'
dependencies {
testImplementation group: 'jakarta.json', name: 'jakarta.json-api', version: '1.1.6'
testImplementation group: 'jakarta.json.bind', name: 'jakarta.json.bind-api', version: '1.0.2'
testImplementation group: 'org.apache.johnzon', name: 'johnzon-jsonb', version: '1.2.8'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.6.2'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine'
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
mavenCentral()
jcenter()
}
compileJava {
exclude 'module-info.java'
options.encoding = 'UTF-8'
options.compilerArgs += [
'--release', '8',
'-Werror',
'-Xlint:all',
'-Xlint:-deprecation'
]
}
jar {
manifest.attributes(
'Multi-Release': 'true',
'Create-By': "Gradle ${gradle.gradleVersion}",
'Bundle-Timestamp': Instant.now().toString(),
'Bundle-Revision': versioning.info.commit,
'Bundle-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']})",
'Implementation-Title': 'emoji-tool',
'Implementation-Version': project.version,
'Specification-Title': 'emoji-tool',
'Specification-Version': project.version
)
}
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options.encoding = 'UTF-8'
options.windowTitle = "Emoji tool ${project.version} API"
}
test {
useJUnitPlatform()
}
task cmij(type: JavaCompile) {
dependsOn compileJava
description 'compile module-info.java'
classpath = files()
source = 'src/main/java/module-info.java'
destinationDir = compileJava.destinationDir
doFirst {
options.encoding = 'UTF-8'
options.compilerArgs += [
'--release', '9',
'--module-path', compileJava.classpath.asPath
]
}
}
classes.dependsOn cmij