mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-25 09:40:57 -05:00
Wire new init-script into action
- Copy init-script to Gradle User Home - Rename init-scripts for consistency and clarity
This commit is contained in:
parent
33c9bfac14
commit
05acc776e8
9 changed files with 10 additions and 9 deletions
|
@ -189,10 +189,11 @@ org.gradle.java.installations.fromEnv=JAVA_HOME_8_X64,JAVA_HOME_11_X64,JAVA_HOME
|
||||||
|
|
||||||
// Copy init scripts from src/resources
|
// Copy init scripts from src/resources
|
||||||
const initScriptFilenames = [
|
const initScriptFilenames = [
|
||||||
'build-result-capture.init.gradle',
|
'gradle-build-action.build-result-capture.init.gradle',
|
||||||
'build-result-capture-service.plugin.groovy',
|
'gradle-build-action.build-result-capture-service.plugin.groovy',
|
||||||
'github-dependency-graph.init.gradle',
|
'gradle-build-action.github-dependency-graph.init.gradle',
|
||||||
'github-dependency-graph-gradle-plugin-apply.groovy'
|
'gradle-build-action.github-dependency-graph-gradle-plugin-apply.groovy',
|
||||||
|
'gradle-build-action.inject-gradle-enterprise.init.gradle'
|
||||||
]
|
]
|
||||||
for (const initScriptFilename of initScriptFilenames) {
|
for (const initScriptFilename of initScriptFilenames) {
|
||||||
const initScriptContent = this.readInitScriptAsString(initScriptFilename)
|
const initScriptContent = this.readInitScriptAsString(initScriptFilename)
|
||||||
|
|
|
@ -82,7 +82,7 @@ def captureUsingBuildFinished(gradle, invocationId) {
|
||||||
|
|
||||||
def captureUsingBuildService(settings, invocationId) {
|
def captureUsingBuildService(settings, invocationId) {
|
||||||
gradle.ext.invocationId = invocationId
|
gradle.ext.invocationId = invocationId
|
||||||
apply from: 'build-result-capture-service.plugin.groovy'
|
apply from: 'gradle-build-action.build-result-capture-service.plugin.groovy'
|
||||||
}
|
}
|
||||||
|
|
||||||
class BuildResults {
|
class BuildResults {
|
|
@ -31,7 +31,7 @@ if (isTopLevelBuild) {
|
||||||
println "Generating dependency graph into '${reportFile}'"
|
println "Generating dependency graph into '${reportFile}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: 'github-dependency-graph-gradle-plugin-apply.groovy'
|
apply from: 'gradle-build-action.github-dependency-graph-gradle-plugin-apply.groovy'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Using the supplied jobCorrelator value:
|
* Using the supplied jobCorrelator value:
|
|
@ -5,7 +5,7 @@ import groovy.json.JsonSlurper
|
||||||
import static org.junit.Assume.assumeTrue
|
import static org.junit.Assume.assumeTrue
|
||||||
|
|
||||||
class TestBuildResultRecorder extends BaseInitScriptTest {
|
class TestBuildResultRecorder extends BaseInitScriptTest {
|
||||||
def initScript = 'build-result-capture.init.gradle'
|
def initScript = 'gradle-build-action.build-result-capture.init.gradle'
|
||||||
|
|
||||||
def "produces build results file for build with #testGradleVersion"() {
|
def "produces build results file for build with #testGradleVersion"() {
|
||||||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.gradle.gradlebuildaction
|
||||||
import static org.junit.Assume.assumeTrue
|
import static org.junit.Assume.assumeTrue
|
||||||
|
|
||||||
class TestDependencyGraph extends BaseInitScriptTest {
|
class TestDependencyGraph extends BaseInitScriptTest {
|
||||||
def initScript = 'github-dependency-graph.init.gradle'
|
def initScript = 'gradle-build-action.github-dependency-graph.init.gradle'
|
||||||
|
|
||||||
static final List<TestGradleVersion> NO_DEPENDENCY_GRAPH_VERSIONS = [GRADLE_3_X, GRADLE_4_X]
|
static final List<TestGradleVersion> NO_DEPENDENCY_GRAPH_VERSIONS = [GRADLE_3_X, GRADLE_4_X]
|
||||||
static final List<TestGradleVersion> DEPENDENCY_GRAPH_VERSIONS = ALL_VERSIONS - NO_DEPENDENCY_GRAPH_VERSIONS
|
static final List<TestGradleVersion> DEPENDENCY_GRAPH_VERSIONS = ALL_VERSIONS - NO_DEPENDENCY_GRAPH_VERSIONS
|
||||||
|
|
|
@ -8,7 +8,7 @@ import static org.junit.Assume.assumeTrue
|
||||||
class TestGradleEnterpriseInjection extends BaseInitScriptTest {
|
class TestGradleEnterpriseInjection extends BaseInitScriptTest {
|
||||||
static final List<TestGradleVersion> CCUD_COMPATIBLE_VERSIONS = ALL_VERSIONS - [GRADLE_3_X]
|
static final List<TestGradleVersion> CCUD_COMPATIBLE_VERSIONS = ALL_VERSIONS - [GRADLE_3_X]
|
||||||
|
|
||||||
def initScript = 'inject-gradle-enterprise.init.gradle'
|
def initScript = 'gradle-build-action.inject-gradle-enterprise.init.gradle'
|
||||||
|
|
||||||
private static final GradleVersion GRADLE_6 = GradleVersion.version('6.0')
|
private static final GradleVersion GRADLE_6 = GradleVersion.version('6.0')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue