forked from gurkenlabs/litiengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-maven.gradle
152 lines (127 loc) · 3.8 KB
/
build-maven.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
145
146
147
148
149
150
151
152
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceSets {
main.java.srcDir "src"
main.resources.srcDir "resources"
test.java.srcDir "tests"
test.resources.srcDir "tests"
}
repositories {
mavenCentral()
}
dependencies {
implementation 'net.java.jinput:jinput:2.0.9'
implementation 'net.java.jinput:jinput:2.0.9:natives-all'
implementation 'com.googlecode.soundlibs:jorbis:0.0.17.4'
implementation 'com.googlecode.soundlibs:tritonus-share:0.3.7.4'
implementation 'com.googlecode.soundlibs:vorbisspi:1.0.3.3'
implementation ('com.googlecode.soundlibs:mp3spi:1.9.5.4') {
exclude group:'junit'
}
implementation 'com.code-disaster.steamworks4j:steamworks4j:1.8.0'
// JAXB modules for JDK 9 or higher
implementation 'javax.activation:javax.activation-api:1.2.0'
implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
testImplementation 'org.mockito:mockito-core:3.3.3'
}
test {
useJUnitPlatform()
}
jar {
from {
configurations.compileClasspath.collect { zipTree it }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude 'META-INF/services/**'
exclude 'module-info.*'
exclude '**/*.dll'
exclude '**/*.jnilib'
exclude '**/*.dylib'
exclude '**/*.so'
exclude 'junit**/**'
}
javadoc {
options.encoding = 'UTF-8'
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
java {
withJavadocJar()
withSourcesJar()
}
task copyNativeLibs(type: Copy) {
from(new File('lib')) { exclude '**/*.jar' }
into new File(buildDir, 'libs')
from(new File('.')) { include 'LICENSE' }
into new File(buildDir, 'libs')
}
task createJavadocs(type: Javadoc) {
source = sourceSets.main.allJava
options.encoding = 'UTF-8'
dependsOn build
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
dependsOn copyNativeLibs
}
group = "de.gurkenlabs"
archivesBaseName = "litiengine"
version = "0.5.1"
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'litiengine'
from components.java
pom {
name = 'litiengine'
packaging = 'jar'
description = 'LITIENGINE is a free and open source Java 2D Game Engine. It provides a comprehensive Java library and a dedicated map editor to create tile-based 2D games.'
url = 'http://litiengine.com'
scm {
connection = 'scm:git:git://github.com/gurkenlabs/litiengine.git'
developerConnection = 'scm:git:[email protected]:gurkenlabs/litiengine.git'
url = 'https://github.com/gurkenlabs/litiengine/'
}
licenses {
license {
name = 'MIT License'
url = 'https://github.com/gurkenlabs/litiengine/blob/master/LICENSE'
}
}
developers {
developer {
id = 'steffen'
name = 'Steffen Wilke'
email = '[email protected]'
}
developer {
id = 'matthias'
name = 'Matthias Wilke'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}