-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
144 lines (124 loc) · 3.73 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.2"
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
group = 'org.soraworld'
version = '2.5.0-SNAPSHOT'
def _BINTRAY_USER = System.getenv('BINTRAY_USER')
def _BINTRAY_KEY = System.getenv('BINTRAY_KEY')
def _REPO_KEY = version.contains("SNAPSHOT") ? 'oss-snapshot-local' : 'oss-release-local'
def _PUBLISH_CFG = version.contains("SNAPSHOT") ? 'mavenSnapshot' : 'mavenRelease'
sourceCompatibility = targetCompatibility = 1.8
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
jcenter()
maven { url 'https://repo.spongepowered.org/maven' }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
maven { url 'https://hub.spigotmc.org/nexus/content/groups/public/' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
}
dependencies {
compile 'org.ow2.asm:asm:5.2'
compile 'org.soraworld:hocon:1.2.3-SNAPSHOT'
compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
compileOnly 'org.spongepowered:spongeapi:7.2.0-SNAPSHOT'
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
group rootProject.group
version rootProject.version
sourceCompatibility = targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
jcenter()
maven { url 'https://repo.spongepowered.org/maven' }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
maven { url 'https://hub.spigotmc.org/nexus/content/groups/public/' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
}
configurations {
shade
compile.extendsFrom(shade)
shadeOnly
compileOnly.extendsFrom(shadeOnly)
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava, rootProject.sourceSets.main.allJava
includeEmptyDirs = false
}
artifacts {
archives jar
archives sourcesJar
}
artifactory {
setContextUrl('https://oss.jfrog.org/artifactory')
publish {
repository {
repoKey = _REPO_KEY
username = _BINTRAY_USER
password = _BINTRAY_KEY
maven = true
}
defaults {
publications(_PUBLISH_CFG)
}
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
includeEmptyDirs = false
}
artifacts {
archives jar
archives sourcesJar
}
artifactory {
setContextUrl('https://oss.jfrog.org/artifactory')
publish {
repository {
repoKey = _REPO_KEY
username = _BINTRAY_USER
password = _BINTRAY_KEY
maven = true
}
defaults {
publications(_PUBLISH_CFG)
}
}
}
publishing {
publications {
mavenRelease(MavenPublication) {
from components.java
groupId = 'org.soraworld'
artifactId = 'violet-api'
version = project.version
artifact sourcesJar
}
mavenSnapshot(MavenPublication) {
from components.java
groupId = 'org.soraworld'
artifactId = 'violet-api'
version = project.version
artifact sourcesJar
}
}
}