/
build.gradle
99 lines (83 loc) · 2.22 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
plugins {
id 'com.jfrog.bintray' version '1.8.4'
id 'java'
id 'eclipse'
id 'maven'
id 'maven-publish'
}
group = 'com.dscalzi'
version = '1.0.0-pre.6'
archivesBaseName = 'ItemCodexLib'
description = """Library to dynamically retrieve items by alias, enum, or legacy data."""
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
compile group: 'com.google.code.gson', name: 'gson', version:'2.8.5'
compileOnly group: 'org.spigotmc', name: 'spigot-api', version:'1.13.1-R0.1-SNAPSHOT'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
testImplementation.extendsFrom compileOnly
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
jar {
baseName = project.name
manifest {
attributes 'Implementation-Version': version, 'Specification-Version': version
}
}
build {
dependsOn clean
dependsOn jar
jar.mustRunAfter clean
}
bintrayUpload {
dependsOn build
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ["BintrayRelease"]
pkg {
repo = 'maven'
name = 'ItemCodexLib'
licenses = ['MIT']
vcsUrl = 'https://github.com/dscalzi/ItemCodexLib.git'
publish = true
version {
name = project.version
released = new Date()
vcsTag = 'v' + project.version
}
}
}
publishing {
publications {
BintrayRelease(MavenPublication) {
from components.java
groupId group
artifactId archivesBaseName
version version
artifact javadocJar
artifact sourcesJar
}
}
}