forked from hierynomus/asn-one
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
138 lines (120 loc) · 3.25 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
128
129
130
131
132
133
134
135
136
137
138
import java.text.SimpleDateFormat
plugins {
id "java"
id "groovy"
id "maven-publish"
id "org.ajoberstar.release-opinion" version "1.4.2"
id "com.github.hierynomus.license" version "0.12.1"
id "com.jfrog.bintray" version "1.7"
id 'ru.vyarus.pom' version '1.0.3'
id 'ru.vyarus.github-info' version '1.1.0'
}
repositories {
mavenCentral()
}
group = "com.hierynomus.asn-one"
sourceCompatibility = 1.7
targetCompatibility = 1.7
configurations.compile.transitive = false
dependencies {
compile "org.slf4j:slf4j-api:1.7.13"
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'commons-io:commons-io:2.5'
testRuntime 'ch.qos.logback:logback-classic:1.1.3'
}
license {
header = project.file("HEADER")
mapping {
java = 'SLASHSTAR_STYLE'
groovy = 'SLASHSTAR_STYLE'
}
strictCheck true
}
release {
grgit = org.ajoberstar.grgit.Grgit.open(project.projectDir)
}
// This disables the pedantic doclint feature of JDK8
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
tasks.withType(Test) {
include "**/*Test.*"
include "**/*Spec.*"
afterSuite { descriptor, result ->
def indicator = "\u001B[32m✓\u001b[0m"
if (result.failedTestCount > 0) {
indicator = "\u001B[31m✘\u001b[0m"
}
logger.lifecycle("$indicator Test ${descriptor.name}; Executed: ${result.testCount}/\u001B[32m${result.successfulTestCount}\u001B[0m/\u001B[31m${result.failedTestCount}\u001B[0m")
}
}
project.tasks.compileGroovy.onlyIf { false }
github {
user 'hierynomus'
license 'Apache'
}
pom {
description 'ASN.1 serialization and parsing library'
url 'https://github.com/hierynomus/asn-one'
developers {
developer {
id "hierynomus"
name "Jeroen van Erp"
email "jeroen@hierynomus.com"
roles {
role "Lead developer"
}
}
}
}
publishing {
publications {
AsnOne(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
if (project.hasProperty("bintrayUsername") && project.hasProperty("bintrayApiKey")) {
bintray {
user = project.property("bintrayUsername")
key = project.property("bintrayApiKey")
publish = true
publications = ["AsnOne"]
pkg {
repo = "maven"
name = project.name
licenses = ["Apache-2.0"]
vcsUrl = "https://github.com/hierynomus/asn-one.git"
labels = ["asn1", "ASN.1", "serialization", "parser"]
githubRepo = "hierynomus/asn-one"
version {
name = project.version.toString()
vcsTag = "v${project.version}"
released = new SimpleDateFormat('yyyy-MM-dd\'T\'HH:mm:ss.SSSZZ').format(new Date())
gpg {
sign = true
passphrase = project.property("signing.password")
}
mavenCentralSync {
sync = true
user = project.property("sonatypeUsername")
password = project.property("sonatypePassword")
close = 1
}
}
}
}
}
project.tasks.release.dependsOn(project.tasks.bintrayUpload)