forked from HaraldWalker/user-agent-utils
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
77 lines (66 loc) · 1.69 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
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+"
}
}
group "com.wizpanda"
version "0.0.3"
apply plugin: "java"
apply plugin: "maven"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "maven-publish"
apply plugin: "com.jfrog.bintray"
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenLocal()
maven { url "https://jcenter.bintray.com" }
}
dependencies {
compile "javax.servlet:javax.servlet-api:4.0.1"
testCompile group: "junit", name: "junit", version: "4.12"
}
install.doLast {
println jar.archiveName
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
/*artifacts {
archives jar
}*/
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
// This is needed to include the source files in the jar as well. Otherwise Bintray will not allow it to push to jcenter()
artifact sourcesJar
artifact javadocJar
}
}
}
bintray {
user = project.getProperty("bintrayUser") ?: System.getenv("BINTRAY_USER")
key = project.getProperty("bintrayKey") ?: System.getenv("BINTRAY_KEY")
publications = ["mavenJava"]
dryRun = false
publish = true
//override = true
pkg {
repo = "maven"
name = "user-agent-utils"
userOrg = "wizpanda"
licenses = ["Apache-2.0"]
vcsUrl = "https://github.com/wizpanda/user-agent-utils"
}
}