This repository was archived by the owner on Jul 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
148 lines (122 loc) · 4.5 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
139
140
141
142
143
144
145
146
147
148
group 'com.github.sinwe'
description = 'Scala wrapper for reactor-core'
apply plugin: 'scala'
apply plugin: "com.github.maiflai.scalatest"
apply plugin: 'signing'
apply plugin: 'maven'
apply plugin: 'org.scoverage'
apply plugin: 'net.researchgate.release'
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'org.owasp.dependencycheck'
repositories {
mavenCentral()
}
ext {
reactorVersion = "3.0.6.RELEASE"
baseScalaVersion = "2.11"
}
dependencies {
// scala dependencies
compile "org.scala-lang:scala-library:$baseScalaVersion.8"
// reactor dependencies
compile group: 'io.projectreactor', name: 'reactor-core', version: "$reactorVersion"
// jsr305
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
// test dependencies
testCompile "org.scalatest:scalatest_$baseScalaVersion:3.0.1"
testRuntime "org.pegdown:pegdown:1.6.0"
testCompile group: 'io.projectreactor.addons', name: 'reactor-test', version: "$reactorVersion"
scoverage "org.scoverage:scalac-scoverage-plugin_$baseScalaVersion:1.1.0", "org.scoverage:scalac-scoverage-runtime_$baseScalaVersion:1.1.0"
}
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.maiflai:gradle-scalatest:0.14"
classpath "gradle.plugin.org.scoverage:gradle-scoverage:2.1.0"
classpath 'net.researchgate:gradle-release:2.5.0'
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3'
classpath 'org.owasp:dependency-check-gradle:1.4.5'
}
}
dependencyCheck {
skipConfigurations=["apiElements", "implementation", "runtimeElements", "runtimeOnly", "testImplementation", "testRuntimeOnly", "scoverageImplementation", "scoverageRuntimeOnly"]
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
signing {
required { isReleaseVersion }
sign configurations.archives
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task scaladocJar(type: Jar, dependsOn: scaladoc) {
classifier = 'javadoc'
from scaladoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives scaladocJar
}
ext.sonatypeUsername = hasProperty("ossrhUsername") ? ossrhUsername : System.getenv("ossrhUsername")
ext.sonatypePassword = hasProperty("ossrhPassword") ? ossrhPassword : System.getenv("ossrhPassword")
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
name 'Scala wrapper for reactor-core'
packaging 'jar'
// optionally artifactId can be defined here
description 'A Scala wrapper for reactor-core so that the code can be fluently used in Scala'
url 'https://sinwe.github.io/reactor-core-scala/'
scm {
connection 'scm:git:git@github.com:sinwe/reactor-core-scala.git'
developerConnection 'scm:git:git@github.com:sinwe/reactor-core-scala.git'
url 'https://github.com/sinwe/reactor-core-scala'
}
licenses {
license {
name 'GNU LESSER GENERAL PUBLIC LICENSE'
url 'https://www.gnu.org/licenses/lgpl-3.0.en.html'
}
}
developers {
developer {
id 'sinwe'
name 'Winarto'
email 'winarto@gmail.com'
}
}
}
}
}
}
afterReleaseBuild.dependsOn uploadArchives
ScalaCompileOptions.metaClass.daemonServer = true
ScalaCompileOptions.metaClass.fork = true
ScalaCompileOptions.metaClass.useAnt = false
ScalaCompileOptions.metaClass.useCompileDaemon = false
project.tasks.scaladoc.scalaDocOptions.additionalParameters=["-no-link-warnings"]
release {
git {
requireBranch = ''
}
}
test {
maxParallelForks = 1
}
testScoverage {
maxParallelForks = 1
}