forked from Trilarion/java-vorbis-support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
112 lines (96 loc) · 3.23 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
apply plugin: 'java'
apply plugin: 'maven-publish'
description = 'MP3 and Vorbis SPI support. Combination of JOrbis, VorbisSPI, MP3SPI, and Tritonus-Share.'
group = 'com.stencyl'
sourceCompatibility = 1.8
targetCompatibility = 1.8
version = rootProject.file('version.txt').text.trim()
def isReleaseVersion = project.hasProperty("release")
if(!isReleaseVersion) version = "$version-SNAPSHOT"
repositories {
mavenCentral()
}
sourceSets {
examples
}
dependencies {
implementation group: 'javazoom', name: 'jlayer', version: '1.0.1'
testCompile 'junit:junit:4.12'
examplesCompile sourceSets.main.output
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
task run(dependsOn: classes, type: JavaExec) {
if (project.hasProperty('mainClass')) {
main = mainClass
}
classpath = sourceSets.main.runtimeClasspath + sourceSets.examples.runtimeClasspath
standardInput = System.in
workingDir = sourceSets.test.output.resourcesDir
}
task debug(dependsOn: classes, type: JavaExec) {
if (project.hasProperty('mainClass')) {
main = mainClass
}
classpath = sourceSets.main.runtimeClasspath + sourceSets.examples.runtimeClasspath
standardInput = System.in
workingDir = sourceSets.test.output.resourcesDir
debug = true
}
if (!sourceSets.test.output.resourcesDir.exists()) {
sourceSets.test.output.resourcesDir.mkdirs()
}
test.workingDir = sourceSets.test.output.resourcesDir
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
library(MavenPublication) {
from components.java
pom {
name.set("mp3 vorbis support")
description.set("MP3 SPI and Vorbis SPI support. Combination of JOrbis, VorbisSPI, MP3SPI, and Tritonus-Share.")
url.set("https://github.com/Stencyl/java-mp3-vorbis-support")
scm {
connection.set("scm:git:git://github.com/Stencyl/java-mp3-vorbis-support.git")
developerConnection.set("scm:git:ssh://github.com/Stencyl/java-mp3-vorbis-support.git")
url.set("https://github.com/Stencyl/java-mp3-vorbis-support")
}
licenses {
license {
name.set("GNU LESSER GENERAL PUBLIC LICENSE, Version 3")
url.set("https://www.gnu.org/licenses/lgpl-3.0.txt")
}
}
developers {
developer {
id.set("Trilarion")
name.set("Trilarion")
email.set("[email protected]")
}
}
}
}
}
repositories {
maven {
name "stencylMavenRepository"
url = project.getProperty(name + (isReleaseVersion ? "ReleaseUrl" : "SnapshotUrl"))
credentials(PasswordCredentials)
}
}
}