-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
build.gradle
93 lines (81 loc) · 2.72 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
plugins {
id 'java-gradle-plugin'
id 'net.researchgate.release'
id 'com.gradle.plugin-publish'
// for eclipse import modifications
id 'eclipse'
}
/* LOCAL SNAPSHOT DEV */
// to install for local testing - do not load this plugin when publishing to plugin portal
// 'maven-publish' and 'com.gradle.plugin-publish' do not interact well with each other
// https://discuss.gradle.org/t/debug-an-issue-in-publish-plugin-gradle-plugin-not-being-prepended-to-groupid/32720
if (version.contains('SNAPSHOT')) {
apply plugin: 'maven-publish'
publishing {
repositories {
mavenLocal()
}
}
task install {
dependsOn publishToMavenLocal
}
}
/* LOCAL SNAPSHOT DEV */
dependencies {
sourceProject project(':jib-core')
sourceProject project(':jib-plugins-common')
ensureNoProjectDependencies()
implementation dependencyStrings.GRADLE_EXTENSION
testImplementation dependencyStrings.JUNIT
testImplementation dependencyStrings.TRUTH
testImplementation dependencyStrings.TRUTH8
testImplementation dependencyStrings.MOCKITO_CORE
testImplementation dependencyStrings.SLF4J_API
testImplementation dependencyStrings.SYSTEM_RULES
testImplementation project(path:':jib-plugins-common', configuration:'tests')
integrationTestImplementation project(path:':jib-core', configuration:'integrationTests')
integrationTestImplementation dependencyStrings.JBCRYPT
// only for testing a concrete Spring Boot example in a test (not for test infrastructure)
testImplementation 'org.springframework.boot:spring-boot-gradle-plugin:2.2.11.RELEASE'
}
/* RELEASE */
// Prepare release
release {
tagTemplate = 'v$version-gradle'
ignoredSnapshotDependencies = [
'com.google.cloud.tools:jib-core',
'com.google.cloud.tools:jib-plugins-common',
]
git {
requireBranch = /^gradle-release-v\d+.*$/ //regex
}
}
// Gradle Plugin Portal releases
pluginBundle {
website = 'https://github.com/GoogleContainerTools/jib/'
vcsUrl = 'https://github.com/GoogleContainerTools/jib/'
tags = ['google', 'java', 'containers', 'docker', 'kubernetes', 'microservices']
}
gradlePlugin {
testSourceSets sourceSets.integrationTest, sourceSets.test
plugins {
jibPlugin {
id = 'com.google.cloud.tools.jib'
displayName = 'Jib'
description = 'Containerize your Java application'
implementationClass = 'com.google.cloud.tools.jib.gradle.JibPlugin'
}
}
}
tasks.publishPlugins.dependsOn build
/* RELEASE */
/* ECLIPSE */
eclipse.classpath.plusConfigurations += [configurations.integrationTestImplementation]
eclipse.classpath.file.whenMerged {
entries.each {
if (it.path == 'src/test/resources' || it.path == 'src/integration-test/resources') {
it.excludes += 'gradle/projects/'
}
}
}
/* ECLIPSE */