Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions build-steps/release/test-release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ apply from: scriptRelativePath(this, 'archunit-examples-utils.gradle')
task testRelease() {
File testReleaseDir = new File(project.buildDir, 'test-release')

// FIXME: for local validation, revert before merging
/*
def configureStagingRepository = {
new File(testReleaseDir, 'build.gradle').with {
text = text.replace('mavenCentral()', '''
Expand All @@ -20,6 +22,14 @@ task testRelease() {
}''')
}
}
*/
def configureLocalRepository = {
new File(testReleaseDir, 'build.gradle').with {
text = text.replace('mavenCentral()', '''
mavenLocal()
mavenCentral()''')
}
}

def configureHttpSocketTimeout = {
new File(testReleaseDir, 'gradle.properties') << 'systemProp.org.gradle.internal.http.socketTimeout=600000\n'
Expand All @@ -31,9 +41,10 @@ task testRelease() {
}.getFiles().collect { it.name.replaceAll(/\.java$/, '') }

def outputStream = new ByteArrayOutputStream()
exec {
project.services.get(ExecOperations).exec {
workingDir testReleaseDir
commandLine './gradlew', ":${exampleProjectName}:build", '-P', "sonatypeUsername=${project.getProperty('sonatypeUsername')}", '-P', "sonatypePassword=${project.getProperty('sonatypePassword')}"
// FIXME: revert before merging
commandLine './gradlew', ":${exampleProjectName}:build"//, '-P', "sonatypeUsername=${project.getProperty('sonatypeUsername')}", '-P', "sonatypePassword=${project.getProperty('sonatypePassword')}"
ignoreExitValue true
standardOutput = outputStream
}
Expand All @@ -53,7 +64,10 @@ task testRelease() {

updateArchUnitExampleVersion(testReleaseDir)

configureStagingRepository()

// FIXME: for local validation, revert before merging
// configureStagingRepository()
configureLocalRepository()
configureHttpSocketTimeout()

testExampleProject('example-plain')
Expand Down
Loading