Skip to content

Commit

Permalink
testing release
Browse files Browse the repository at this point in the history
  • Loading branch information
drallgood committed Apr 19, 2024
1 parent 3c569f6 commit b0d8ada
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import java.util.*
import net.researchgate.release.ReleaseExtension
import net.researchgate.release.tasks.CommitNewVersion
/*
* This file was generated by the Gradle 'init' task.
*
Expand All @@ -12,6 +13,7 @@ plugins {
`jvm-test-suite`
signing
id("com.benjaminsproule.license")

}

repositories {
Expand All @@ -23,6 +25,10 @@ repositories {
maven {
url = uri("https://maven.restlet.talend.com")
}

maven {
url = uri("https://plugins.gradle.org/m2/")
}
}

extra["isReleaseVersion"] = !version.toString().endsWith("SNAPSHOT")
Expand Down Expand Up @@ -95,11 +101,16 @@ license {
ext.set("email", "[email protected]")
excludes(arrayListOf("*pom.xml","*.checkstyle","**/*.cer","**/*.pem","**/*.p12","**/*.ignored_file","site/*","**/*.json","**/*.png"))
}

apply(plugin = "net.researchgate.release")

configure<ReleaseExtension> {
with(git) {
requireBranch.set("master")
// to disable branch verification: requireBranch.set(null as String?)
}
}

tasks.withType<CommitNewVersion> {
dependsOn("publishToSonatype")
dependsOn("closeAndReleaseSonatypeStagingRepository")
}
26 changes: 26 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,30 @@ subprojects {
initializeSonatypeStagingRepository {
shouldRunAfter(tasks.withType<Sign>())
}

}

// Workaround for https://github.com/researchgate/gradle-release/issues/184
configure(listOf(tasks.release, tasks.runBuildTasks)) {
configure {
actions.clear()
doLast {
GradleConnector
.newConnector()
.forProjectDirectory(layout.projectDirectory.asFile)
.connect()
.use { projectConnection ->
val buildLauncher = projectConnection
.newBuild()
.forTasks(*tasks.toTypedArray())
.setStandardInput(System.`in`)
.setStandardOutput(System.out)
.setStandardError(System.err)
gradle.startParameter.excludedTaskNames.forEach {
buildLauncher.addArguments("-x", it)
}
buildLauncher.run()
}
}
}
}
27 changes: 0 additions & 27 deletions jpasskit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.gradle.tooling.GradleConnector

/*
* This file was generated by the Gradle 'init' task.
*
Expand Down Expand Up @@ -36,29 +34,4 @@ java {

tasks.named<Test>("test") {
useTestNG()
}

// Workaround for https://github.com/researchgate/gradle-release/issues/184
configure(listOf(tasks.release, tasks.runBuildTasks)) {
configure {
actions.clear()
doLast {
GradleConnector
.newConnector()
.forProjectDirectory(layout.projectDirectory.asFile)
.connect()
.use { projectConnection ->
val buildLauncher = projectConnection
.newBuild()
.forTasks(*tasks.toTypedArray())
.setStandardInput(System.`in`)
.setStandardOutput(System.out)
.setStandardError(System.err)
gradle.startParameter.excludedTaskNames.forEach {
buildLauncher.addArguments("-x", it)
}
buildLauncher.run()
}
}
}
}
1 change: 0 additions & 1 deletion jpasskit/gradle.properties

This file was deleted.

0 comments on commit b0d8ada

Please sign in to comment.