forked from barnhill/barcode-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
127 lines (112 loc) · 3.52 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
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
plugins {
id 'java-library'
id 'com.jfrog.bintray' version '1.8.4'
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
wrapper {
//if you change this version you will need to run the 'gradlew wrapper' command twice from the command line to auto update the gradle cache
gradleVersion = "5.6.2"
}
group 'com.pnuema.java'
version '1.5'
sourceCompatibility = 1.8
repositories {
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set("javadoc")
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
ext {
siteUrl = 'https://github.com/barnhill/barcode-java'
gitUrl = 'https://github.com/barnhill/barcode-java.git'
descr = 'Barcode image generation library in Java'
}
bintray {
if (System.getenv("BINTRAY_USER") != null)
user = System.getenv("BINTRAY_USER")
else
user = BINTRAY_USER
if (System.getenv("BINTRAY_APIKEY") != null)
key = System.getenv("BINTRAY_APIKEY")
else
key = BINTRAY_APIKEY
publications = ['mavenJava']
dryRun = false //[Default: false] Whether to run this as dry-run, without deploying
publish = true //[Default: false] Whether version should be auto published after an upload
override = false //[Default: false] Whether to override version artifacts already published
pkg {
configurations = ['archives']
repo = "maven"
name = "barcode-java"
desc = descr
websiteUrl = "https://github.com/barnhill/barcode-java"
githubRepo = 'barnhill/barcode-java'
githubReleaseNotesFile = 'README.md'
issueTrackerUrl = 'https://github.com/barnhill/barcode-java/issues'
vcsUrl = "https://github.com/barnhill/barcode-java.git"
licenses = ["Apache-2.0"]
labels = ['java', 'barcode', 'image', 'jar', 'generator']
publicDownloadNumbers = true
publish = true
version {
gpg {
sign = true
if (System.getenv("BINTRAY_GPGPASSWORD") != null)
passphrase = System.getenv("BINTRAY_GPGPASSWORD")
else
passphrase = BINTRAY_GPGPASSWORD
}
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId group
artifactId project.name
version version
pom {
name = project.name
packaging = 'jar'
description = descr
url = siteUrl
inceptionYear = '2018'
licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
distribution = "repo"
}
}
developers {
developer {
id = "barnhill"
name = "Brad Barnhill"
email = "[email protected]"
}
}
scm {
connection = gitUrl
developerConnection = gitUrl
url = siteUrl
}
}
}
}
}