-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
77 lines (61 loc) · 2.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
plugins {
id 'io.freefair.lombok' version '5.3.3.3'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'org.cadixdev.licenser' version '0.6.1'
}
version = '1.0-SNAPSHOT'
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
subprojects {
apply plugin: 'java'
apply plugin: 'io.freefair.lombok'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'org.cadixdev.licenser'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
generateLombokConfig.enabled = false
repositories {
mavenCentral()
maven {
url 'https://nexus.scarsz.me/content/groups/public/'
}
}
configurations {
shaded
implementation.extendsFrom(shaded)
}
jar {
// avoid needing to run licenseFormat & shadowJar when building
dependsOn licenseFormat
finalizedBy shadowJar
}
shadowJar {
configurations = [project.configurations.shaded]
relocate 'github.scarsz.configuralize', 'me.minecraftauth.config'
relocate 'com.udojava.evalex', 'me.minecraftauth.lib.evalex'
relocate 'com.github.benmanes.caffeine', 'me.minecraftauth.lib.caffeine'
//noinspection GroovyAssignabilityCheck
archiveClassifier = null
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
//noinspection GroovyAssignabilityCheck
archiveClassifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
//noinspection GroovyAssignabilityCheck
archiveClassifier = 'javadoc'
}
// artifacts {
// archives sourcesJar
// archives javadocJar
// }
license {
header = rootProject.file('LICENSE_HEADER')
properties {
String inception = '2021'
String currentYear = Calendar.getInstance().get(Calendar.YEAR)
year = inception == currentYear ? currentYear : inception + '-' + currentYear
}
include '**/*.java' // only java files
}
}