forked from GoogleContainerTools/jib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
88 lines (73 loc) · 2.58 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
plugins {
id 'io.freefair.maven-plugin'
id 'net.researchgate.release'
id 'maven-publish'
id 'eclipse'
}
// only maven specific dependencies should be versioned, everything else should be defined by constrains in
// parent build.gradle
dependencies {
sourceProject project(':jib-core')
sourceProject project(':jib-plugins-common')
ensureNoProjectDependencies()
implementation dependencyStrings.MAVEN_EXTENSION
implementation dependencyStrings.MAVEN_API
implementation dependencyStrings.MAVEN_CORE
// compileOnly + testImplementation equivalent to "provided"
compileOnly dependencyStrings.MAVEN_PLUGIN_ANNOTATIONS
// needed to suppress "unknown enum constant" warnings
testImplementation dependencyStrings.MAVEN_PLUGIN_ANNOTATIONS
// maven-plugin-testing-harness pulls in conflicting implementations of DefaultPlexusContainer
// (sisu (correct) vs default-plexus-container (wrong)) so ensure this is first in the test classpath
testImplementation dependencyStrings.SISU_PLEXUS
testImplementation dependencyStrings.MAVEN_TESTING_HARNESS
testImplementation dependencyStrings.JUNIT
testImplementation dependencyStrings.TRUTH
testImplementation dependencyStrings.TRUTH8
testImplementation dependencyStrings.MOCKITO_CORE
testImplementation dependencyStrings.SLF4J_API
testImplementation dependencyStrings.SYSTEM_RULES
testImplementation dependencyStrings.MAVEN_VERIFIER
testImplementation dependencyStrings.MAVEN_COMPAT
testImplementation dependencyStrings.SLF4J_SIMPLE
integrationTestImplementation dependencyStrings.JBCRYPT
testImplementation project(path:':jib-plugins-common', configuration:'tests')
integrationTestImplementation project(path:':jib-core', configuration:'integrationTests')
}
/* TESTING */
test.dependsOn publishToMavenLocal
integrationTest.dependsOn publishToMavenLocal
/* TESTING */
/* RELEASE */
configureMavenRelease()
publishing {
publications {
mavenJava(MavenPublication) {
pom {
name = 'Jib'
description = 'A Maven plugin for building container images for your Java applications.'
}
}
}
}
release {
tagTemplate = 'v$version-maven'
ignoredSnapshotDependencies = [
'com.google.cloud.tools:jib-core',
'com.google.cloud.tools:jib-plugins-common',
]
git {
requireBranch = /^maven-release-v\d+.*$/ //regex
}
}
/* RELEASE */
/* ECLIPSE */
eclipse.classpath.plusConfigurations += [configurations.integrationTestImplementation]
eclipse.classpath.file.whenMerged {
entries.each {
if (it.path == 'src/test/resources') {
it.excludes += 'maven/projects/'
}
}
}
/* ECLIPSE */