Skip to content

Commit 74f1b88

Browse files
authored
Add bitbucket to the regex as well and test using bitbucket urls (#442)
1 parent 8571c51 commit 74f1b88

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

gradle-plugin/plugin/src/main/kotlin/com/emergetools/android/gradle/util/Repositories.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import java.util.regex.Pattern
1212
private val gitRepoUriPattern: Pattern =
1313
Pattern.compile(
1414
"^(?:(?:https://|git://|http://)(?:.+:.+@)?|(?:ssh)?.*?@)" +
15-
"(.*?(?:github|gitlab).*?)(?:/|:[0-9]*?/|:)(.*?)(?:\\.git)?$"
15+
"(.*?(?:github|gitlab|bitbucket).*?)(?:/|:[0-9]*?/|:)(.*?)(?:\\.git)?$"
1616
)
1717

1818
/**

gradle-plugin/plugin/src/test/kotlin/com/emergetools/android/gradle/util/RepositoriesTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import java.util.Locale
1010
class RepositoriesTest {
1111

1212
companion object {
13-
private val hostNames = listOf("gitlab", "github")
13+
private val hostNames = listOf("gitlab", "github", "bitbucket")
1414
private val rawUrls = listOf(
1515
"http://%s.com/acme-inc/my-project",
1616
"https://%s.com/acme-inc/my-project",

settings.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ plugins {
1414
id("com.android.settings") version "8.8.0" // Keep in sync with agp in libs.versions.toml
1515
}
1616

17+
val isCI = System.getenv("CI") != null
18+
1719
develocity {
1820
buildScan {
1921
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
2022
termsOfUseAgree.set("yes")
23+
uploadInBackground = !isCI
2124
}
2225
}
2326

0 commit comments

Comments
 (0)