-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
76 lines (64 loc) · 1.4 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
plugins {
id 'org.cadixdev.licenser' version '0.6.1'
id 'java-library'
id 'maven-publish'
}
base {
group = 'com.unascribed'
archivesName = 'JXLJXL'
version = '0.2.1'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release = 20
options.compilerArgs += ['--enable-preview']
}
sourceSets {
viewer {
compileClasspath += sourceSets.main.output
}
}
license {
header = project.file('LICENSE')
exclude '**/com/unascribed/jxljxl/panama/**'
exclude '**/org/imgscalr/**'
}
jar {
from 'LICENSE'
}
task viewerJar(type: Jar) {
from sourceSets.viewer.output
archiveClassifier = 'viewer'
manifest.attributes (
'Main-Class': 'com.unascribed.jxljxl.viewer.JXLJXLViewer',
'Class-Path': tasks.jar.archivePath.getName()
)
}
tasks.build.dependsOn viewerJar
java {
withSourcesJar()
}
publishing {
repositories {
if (project.hasProperty("publish-username")) {
maven {
url "https://repo-api.sleeping.town/"
credentials {
username project.hasProperty("publish-username") ? project.getProperty("publish-username") : null
password project.hasProperty("publish-password") ? project.getProperty("publish-password") : null
}
}
}
maven {
url file('build/maven').toURI().toString()
}
}
publications {
maven(MavenPublication) {
groupId = 'com.unascribed'
artifactId = 'jxljxl'
version = project.version
from components.java
}
}
}