forked from mlueders/gradle-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
92 lines (74 loc) · 2.23 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
import com.bancvue.gradle.maven.DefaultPublishFilter
import org.apache.ivy.core.module.descriptor.Artifact
import org.gradle.api.artifacts.maven.MavenDeployment
import org.gradle.api.publication.maven.internal.PomFilter
apply plugin: "bancvue-oss"
apply plugin: "integration-test"
apply plugin: "signing"
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile "org.codehaus.groovy:groovy-all:2.1.2"
compile "nl.javadude.gradle.plugins:license-gradle-plugin:0.6.0"
testCompile "junit:junit:4.11"
testCompile "org.mockito:mockito-all:1.9.5"
}
check.dependsOn integrationTest
license {
ext.name = "BancVue, LTD"
}
[licenseMain, licenseFormatMain]*.exclude "licenses/*"
// exclude the test kit source which was copied from a different project (https://github.com/alkemist/gradle-test-kit)
// and has it's own license
[licenseMainTest, licenseFormatMainTest]*.exclude "org/gradle/testkit/**"
/**********************************************************************************************************************/
// Everything below is POC
artifacts {
archives jarMainTest
archives sourcesJarMainTest
}
signing {
sign configurations.archives
}
uploadArchives {
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
pom.project {
packaging "jar"
url "https://github.com/BancVue/GradlePluginsCore"
developers {
developer {
id "bancvue_oss"
name "BancVue Open Source Development"
email "[email protected]"
}
}
scm {
url "https://github.com/BancVue/GradlePluginsCore.git"
connection "scm:git:[email protected]:BancVue/GradlePluginsCore.git"
developerConnection "scm:git:[email protected]:BancVue/GradlePluginsCore.git"
}
}
}
}
uploadArchives {
repositories.mavenDeployer {
addFilter("test") { Artifact artifact, file ->
(artifact.name =~ /.*-test$/).matches()
}
addFilter("default", new DefaultPublishFilter(it))
getActivePomFilters().each { PomFilter pomFilter ->
pomFilter.setPomTemplate(pom.effectivePom)
}
}
}
install {
repositories.mavenInstaller {
addFilter("test") { Artifact artifact, file ->
(artifact.name =~ /.*-test$/).matches()
}
addFilter("default", new DefaultPublishFilter(it))
}
}