-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
83 lines (71 loc) · 1.73 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
}
plugins {
id "com.jfrog.bintray" version "1.7"
}
group 'MicroUtils'
version 'MUVERSION'
// Apply the java plugin to add support for Java
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile "com.google.guava:guava:18.0"
compile "com.google.code.findbugs:jsr305:3.0.1"
compile "org.slf4j:slf4j-api:1.7.21"
testCompile 'junit:junit:4.12'
testCompile "org.slf4j:slf4j-log4j12:1.7.21"
testCompile "log4j:log4j:1.2.17"
}
//https://github.com/bintray/gradle-bintray-plugin
bintray {
user = 'oshai'
key = 'my_key'
publications = ['MyPublication']
pkg {
repo = 'mujava'
name = 'MuJava'
userOrg = 'microutils'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/MicroUtils/MuJava'
version {
name = 'MUVERSION'
desc = 'MuJava MUVERSION'
released = new Date()
}
}
}
// 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 sourcesJar, javadocJar
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId 'io.github.microutils'
artifactId 'mujava'
version 'MUVERSION'
artifact sourcesJar
artifact javadocJar
}
}
}