From 6b2aa7d293e44db12c58b86cdcb2ef635b31327b Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 20 Jul 2023 23:34:03 -0700 Subject: [PATCH] Update Gradle config to reflect main branch rename --- build.gradle.kts | 2 +- buildSrc/src/main/kotlin/scenery/base.gradle.kts | 4 ++-- buildSrc/src/main/kotlin/scenery/docs.gradle.kts | 4 ++-- buildSrc/src/main/kotlin/scenery/publish.gradle.kts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b2bea4ff6..b95579b6b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -359,7 +359,7 @@ tasks { dokkaSourceSets.configureEach { sourceLink { localDirectory.set(file("src/main/kotlin")) - remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/master/src/main/kotlin")) + remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/main/src/main/kotlin")) remoteLineSuffix.set("#L") } } diff --git a/buildSrc/src/main/kotlin/scenery/base.gradle.kts b/buildSrc/src/main/kotlin/scenery/base.gradle.kts index e3d319bbb..99fb0e258 100644 --- a/buildSrc/src/main/kotlin/scenery/base.gradle.kts +++ b/buildSrc/src/main/kotlin/scenery/base.gradle.kts @@ -130,10 +130,10 @@ tasks { * otherwise: a reference to a file containing the current commit hash */ val head = file(gitFolder + "HEAD").readText().split(":") // .git/HEAD val isCommit = head.size == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd - // def isRef = head.length > 1 // ref: refs/heads/master + // def isRef = head.length > 1 // ref: refs/heads/main when { isCommit -> head[0] // e5a7c79edabb - else -> file(gitFolder + head[1].trim()) // .git/refs/heads/master + else -> file(gitFolder + head[1].trim()) // .git/refs/heads/main .readText() }.trim().take(digit) } diff --git a/buildSrc/src/main/kotlin/scenery/docs.gradle.kts b/buildSrc/src/main/kotlin/scenery/docs.gradle.kts index ee8d81335..b4e1a5250 100644 --- a/buildSrc/src/main/kotlin/scenery/docs.gradle.kts +++ b/buildSrc/src/main/kotlin/scenery/docs.gradle.kts @@ -17,7 +17,7 @@ // dokkaSourceSets.configureEach { // sourceLink { // localDirectory.set(file("src/main/kotlin")) -// remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/master/src/main/kotlin")) +// remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/main/src/main/kotlin")) // remoteLineSuffix.set("#L") // } // } @@ -42,4 +42,4 @@ //} // //fun ArtifactHandler.archives(artifactNotation: Any) = -// add("archives", artifactNotation) \ No newline at end of file +// add("archives", artifactNotation) diff --git a/buildSrc/src/main/kotlin/scenery/publish.gradle.kts b/buildSrc/src/main/kotlin/scenery/publish.gradle.kts index 59cebb12b..162487eda 100644 --- a/buildSrc/src/main/kotlin/scenery/publish.gradle.kts +++ b/buildSrc/src/main/kotlin/scenery/publish.gradle.kts @@ -17,7 +17,7 @@ tasks { dokkaSourceSets.configureEach { sourceLink { localDirectory.set(file("src/main/kotlin")) - remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/master/src/main/kotlin")) + remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/main/src/main/kotlin")) remoteLineSuffix.set("#L") } } @@ -26,7 +26,7 @@ tasks { dokkaSourceSets.configureEach { sourceLink { localDirectory.set(file("src/main/kotlin")) - remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/master/src/main/kotlin")) + remoteUrl.set(URL("https://github.com/scenerygraphics/scenery/tree/main/src/main/kotlin")) remoteLineSuffix.set("#L") } }