blob: da559b54fecc9131a23e162f999ce7917ebe65ff (
plain)
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
|
project.buildDir = 'gradle_build'
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
repositories {
mavenCentral()
}
project.ext {
baseVersion = '21.0'
}
// set all java compilation to use UTF-8 encoding.
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
task publishLocal(type: Upload) {
configuration = configurations.archives
repositories {
mavenDeployer {
repository(url: uri("$rootDir/../out/host/repo"))
}
}
}
}
|