Skip to content

Commit 0be02cf

Browse files
committed
Determine releaseBranch automatically based on version
# Conflicts: # documentation/documentation.gradle.kts
1 parent 11ddd87 commit 0be02cf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

documentation/documentation.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
`kotlin-library-conventions`
1313
}
1414

15-
val modularProjects: List<Project> by rootProject.extra
15+
val modularProjects: List<Project> by rootProject
1616

1717
// Because we need to set up Javadoc aggregation
1818
modularProjects.forEach { evaluationDependsOn(it.path) }
@@ -50,6 +50,7 @@ asciidoctorj {
5050

5151
val snapshot = rootProject.version.toString().contains("SNAPSHOT")
5252
val docsVersion = if (snapshot) "snapshot" else rootProject.version
53+
val releaseBranch = if (snapshot) "master" else "r${rootProject.version}"
5354
val docsDir = file("$buildDir/ghpages-docs")
5455
val replaceCurrentDocs = project.hasProperty("replaceCurrentDocs")
5556
val uploadPdfs = !snapshot
@@ -150,15 +151,15 @@ tasks {
150151
attributes(mapOf(
151152
"linkToPdf" to uploadPdfs,
152153
"jupiter-version" to version,
153-
"platform-version" to project.properties["platformVersion"],
154-
"vintage-version" to project.properties["vintageVersion"],
154+
"platform-version" to project.property("platformVersion"),
155+
"vintage-version" to project.property("vintageVersion"),
155156
"bom-version" to version,
156157
"junit4-version" to Versions.junit4,
157158
"apiguardian-version" to Versions.apiGuardian,
158159
"ota4j-version" to Versions.ota4j,
159160
"surefire-version" to Versions.surefire,
160-
"release-branch" to project.properties["releaseBranch"],
161-
"docs-version" to project.properties["docsVersion"],
161+
"release-branch" to releaseBranch,
162+
"docs-version" to docsVersion,
162163
"revnumber" to version,
163164
"consoleLauncherOptionsFile" to consoleLauncherOptionsFile,
164165
"experimentalApisTableFile" to experimentalApisTableFile,

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ vintageGroup = org.junit.vintage
1010
vintageVersion = 5.6.2-SNAPSHOT
1111

1212
defaultBuiltBy = JUnit Team
13-
releaseBranch = master
1413

1514
# We need more metaspace due to apparent memory leak in Asciidoctor/JRuby
1615
org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError

0 commit comments

Comments
 (0)