-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
73 lines (60 loc) · 1.68 KB
/
build.gradle
File metadata and controls
73 lines (60 loc) · 1.68 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.0.0' apply false
}
allprojects {
group = 'net.rapust.observator'
version = '1.0.0-SNAPSHOT'
}
configure(subprojects) {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
repositories {
mavenCentral()
mavenLocal()
maven {
url = 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven { url 'https://jitpack.io' }
}
tasks {
shadowJar {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/maven/**'
archiveFileName.set("${project.name}.jar")
}
compileJava {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
}
compileTestJava {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
}
build {
dependsOn(shadowJar)
}
jar {
manifest {
attributes(
'Main-Class': 'net.rapust.observator.Bootstrap'
)
}
finalizedBy(publishToMavenLocal)
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
}