-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gradle)!: Extract initialization and defaults to jenkins-plugin-…
…resolver plugin
- Loading branch information
1 parent
63252db
commit f6e9bea
Showing
6 changed files
with
67 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() // alias for https://plugins.gradle.org/m2/ | ||
} | ||
|
||
dependencies { | ||
implementation 'com.adarshr:gradle-test-logger-plugin:4.0.0' | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import org.example.JenkinsPlugins | ||
|
||
|
||
plugins { | ||
id 'groovy' | ||
id 'idea' | ||
id 'com.adarshr.test-logger' | ||
} | ||
|
||
JenkinsPlugins.create(project) | ||
|
||
java { | ||
toolchain { | ||
setLanguageVersion JavaLanguageVersion.of(11) | ||
} | ||
} | ||
|
||
idea { | ||
module { | ||
downloadJavadoc = true | ||
downloadSources = true | ||
} | ||
} | ||
|
||
configurations { | ||
testPlugins | ||
} | ||
|
||
tasks.named('test') { | ||
final String STACK_WRITE_PROPERTY = 'pipeline.stack.write' | ||
final String LOGLEVEL_PROPERTY = 'testlogger.logLevel' | ||
final String JENKINS_TEST_HARNESS_BUILD_DIR_PROPERTY = 'buildDirectory' | ||
|
||
systemProperty STACK_WRITE_PROPERTY, System.getProperty(STACK_WRITE_PROPERTY) ?: findProperty(STACK_WRITE_PROPERTY) | ||
systemProperty LOGLEVEL_PROPERTY, System.getProperty(LOGLEVEL_PROPERTY) ?: findProperty(LOGLEVEL_PROPERTY) | ||
systemProperty JENKINS_TEST_HARNESS_BUILD_DIR_PROPERTY, buildDir | ||
|
||
useJUnitPlatform() | ||
|
||
testlogger { | ||
theme 'mocha-parallel' | ||
showStandardStreams true | ||
showFullStackTraces true | ||
} | ||
|
||
reports { | ||
junitXml { | ||
outputPerTestCase = true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters