This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
107 lines (88 loc) · 2.24 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
plugins {
id 'com.jfrog.bintray' version '1.8.4'
id 'java-library'
id 'maven-publish'
}
def versionObject = new Version(major: 1, minor: 0, patch: 1)
description 'Java implementation of Zalgo.'
group 'me.nsylke.zalgo4j'
version versionObject.toString()
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
}
sourceSets {
examples {
compileClasspath += main.output
runtimeClasspath += main.output
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.incremental = true
}
compileTestJava.enabled = false
processTestResources.enabled = false
jar {
baseName = project.name
manifest.attributes 'Implementation-Version': version
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from jar.destinationDir
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
javadoc {
failOnError = false
options.memberLevel = JavadocMemberLevel.PUBLIC
options.author()
options.encoding = 'UTF-8'
}
publishing {
publications {
ZalgoRelease(MavenPublication) {
from components.java
groupId 'me.nsylke.zalgo4j'
artifactId 'zalgo4j'
version project.version
artifact javadocJar
artifact sourcesJar
}
}
}
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 = ['ZalgoRelease']
pkg {
repo = 'maven'
name = 'Zalgo4J'
licenses = ['MIT']
vcsUrl = 'https://github.com/nsylke/Zalgo4J.git'
publish = true
version {
name = project.version
released = new Date()
}
}
}
build {
dependsOn jar
dependsOn javadocJar
dependsOn sourcesJar
javadocJar.mustRunAfter jar
sourcesJar.mustRunAfter javadocJar
}
class Version {
String major, minor, patch
String toString() {
return "${major}.${minor}.${patch}"
}
}