forked from GoogleContainerTools/jib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
76 lines (63 loc) · 2.06 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
plugins {
id 'application'
id 'net.researchgate.release'
id 'eclipse'
}
ext {
cliMainClass = 'com.google.cloud.tools.jib.cli.JibCli'
}
// use `run` to build and run the app
// use `installDist` or `distZip` to create an installable application
application {
applicationName = 'jib'
mainClassName = cliMainClass
}
sourceSets.main.java.srcDirs += ["${buildDir}/generated-src"]
tasks.register('generateSources', Copy) {
// to re-run the task whenever the file changes
inputs.file 'gradle.properties'
from fileTree('src/java-templates')
into "${buildDir}/generated-src"
rename('\\.template$', '')
expand(['version': "${version}"])
}
compileJava.source generateSources
dependencies {
implementation project(':jib-core')
implementation project(':jib-plugins-common')
implementation dependencyStrings.COMMONS_TEXT
implementation dependencyStrings.JACKSON_DATAFORMAT_YAML
implementation dependencyStrings.JACKSON_DATABIND
implementation dependencyStrings.GUAVA
implementation dependencyStrings.PICOCLI
implementation dependencyStrings.GOOGLE_HTTP_CLIENT
implementation dependencyStrings.GOOGLE_HTTP_CLIENT_APACHE_V2
testImplementation dependencyStrings.JUNIT
testImplementation dependencyStrings.JUNIT_PARAMS
testImplementation dependencyStrings.TRUTH
testImplementation dependencyStrings.TRUTH8
testImplementation dependencyStrings.MOCKITO_CORE
testImplementation dependencyStrings.SLF4J_API
testImplementation dependencyStrings.SYSTEM_RULES
integrationTestImplementation project(path:':jib-core', configuration:'integrationTests')
}
release {
tagTemplate = 'v$version-cli'
ignoredSnapshotDependencies = [
'com.google.cloud.tools:jib-core',
'com.google.cloud.tools:jib-plugins-common',
]
git {
requireBranch = /^cli-release-v\d+.*$/ //regex
}
}
/* ECLIPSE */
eclipse.classpath.plusConfigurations += [configurations.integrationTestImplementation]
eclipse.classpath.file.whenMerged {
entries.each {
if (it.path == 'src/integration-test/resources') {
it.excludes += ['jarTest/', 'warTest/']
}
}
}
/* ECLIPSE */