-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
93 lines (75 loc) · 2.28 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
plugins {
id 'io.franzbecker.gradle-lombok' version '1.11' apply false
}
import io.franzbecker.gradle.lombok.task.DelombokTask
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'io.franzbecker.gradle-lombok'
group 'co.aikar'
version '1.1.0-SNAPSHOT'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
lombok {
version = '1.16.20'
sha256 = ''
}
repositories {
mavenLocal()
mavenCentral()
maven {
name 'aikar'
url 'https://repo.aikar.co/content/groups/aikar/'
}
}
dependencies {
compileOnly group: 'org.jetbrains', name: 'annotations', version: '15.0'
}
project.conf2ScopeMappings.addMapping(300, configurations.compileOnly, 'provided')
// Delombok Task
task delombok(type: DelombokTask, dependsOn: compileJava) {
ext.outputDir = file("$buildDir/delombok")
classpath += project.configurations.compileOnly
outputs.dir(outputDir)
sourceSets.main.java.srcDirs.each {
inputs.dir(it)
args(it, "-d", outputDir)
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
dependsOn delombok
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
dependsOn delombok
source = file("${buildDir}/${delombok.name}")
failOnError = false
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
artifacts {
archives javadocJar
archives sourcesJar
}
task deploy() {
dependsOn install
dependsOn uploadArchives
}
if(project.hasProperty('nexusUser') && project.hasProperty('nexusPass')) {
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://54.37.204.9:8081/repository/pvpgym/') {
authentication(userName: nexusUser, password: nexusPass)
}
snapshotRepository(url: 'http://54.37.204.9:8081/repository/pvpgym/') {
authentication(userName: nexusUser, password: nexusPass)
}
}
}
}
}
}