forked from libgdx/gdx-pay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish_java.gradle
32 lines (26 loc) · 944 Bytes
/
publish_java.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
apply plugin: 'maven'
apply plugin: 'signing'
apply from: rootProject.file('publish_to_maven_repo.gradle')
ext.mavenDeploymentVersion = isReleaseBuild() ? version.replace("-SNAPSHOT", "") : version
afterEvaluate { project ->
task libraryJar(type: Jar, dependsOn:classes) {
from sourceSets.main.output.classesDir
if (configurations.findByName('compileAndIncludeClassesInLibraryJar') != null) {
from configurations.compileAndIncludeClassesInLibraryJar.collect { it.isDirectory() ? it : zipTree(it) }
}
classifier = 'library'
}
task sourcesJar(type: Jar, dependsOn:classes) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn:javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
artifacts {
archives libraryJar
archives sourcesJar
archives javadocJar
}
}