Skip to content

Commit 60da517

Browse files
committed
update commit count logic
1 parent ab2b6b5 commit 60da517

File tree

4 files changed

+37
-26
lines changed

4 files changed

+37
-26
lines changed

build-logic/convention/src/main/kotlin/Github.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ abstract class GithubCreateReleaseTask : Github() {
7474
val name = "${project.name}-v$commitCount"
7575

7676
if (repository.getReleaseByTagName(tagName) != null) {
77-
doLast {
78-
project.logger.warn("Release $name already exists")
79-
}
77+
val logString = "Release $name already exists"
78+
79+
project.gradle.addBuildListener(object : BuildAdapter() {
80+
override fun buildFinished(result: BuildResult) {
81+
println(logString)
82+
}
83+
})
8084
return
8185
}
8286

build-logic/convention/src/main/kotlin/buildlogic/git/Git.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ import org.gradle.process.ExecOutput
1010
private fun Project.getCommitCountExec() = providers.exec {
1111
executable("git")
1212
args("rev-list", "--count", "HEAD")
13-
args(projectDir.absolutePath)
14-
args(rootProject.file("gradle").absolutePath)
13+
args(projectDir)
14+
args(rootProject.file("gradle"))
1515
args(rootProject.file("build-logic"))
1616

17-
rootProject.projectDir.listFiles { file -> file.isFile && file.extension != "md" }!!.forEach { args(it.absolutePath) }
17+
args(rootProject.file("build.gradle.kts"))
18+
args(rootProject.file("settings.gradle.kts"))
19+
args(rootProject.file("gradle.properties"))
20+
args(rootProject.file("proguard-rules.pro"))
21+
22+
args(rootProject.file("gradlew"))
23+
args(rootProject.file("gradlew.bat"))
1824

1925
extensions.findByType<BaseExtension>()?.let {
2026
val metadata = rootProject.file("metadata").resolve(it.namespace ?: "-")

modules.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
include(":AlwaysAllowChargingFeedback")
2+
include(":AlwaysAllowMultiInstanceSplit")
3+
include(":AnimationScaleMod")
4+
include(":AntiBrightnessChange")
5+
include(":AutomaticAdvancedSettingsExpander")
6+
include(":BetterBluetoothDeviceSort")
7+
include(":BetterVerboseWiFiLogging")
8+
include(":ClassHunter")
9+
include(":CodecMod")
10+
include(":DontResetIfBootedAndConnected")
11+
include(":FreeNotifications")
12+
include(":KeepSplitScreenRatio")
13+
include(":MotionEventMod")
14+
include(":MuteSlf4jWarnings")
15+
include(":OpenWifiOnTop")
16+
include(":PersistentForegroundServiceNotifications")
17+
include(":PreventAudioFocus")
18+
include(":ResetAllNotificationChannels")
19+
include(":RotationControl")
20+
include(":UpsideWifi")

settings.gradle.kts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,4 @@ include(":logger")
4444
include(":reflection")
4545
include(":template")
4646

47-
include(":AlwaysAllowChargingFeedback")
48-
include(":AlwaysAllowMultiInstanceSplit")
49-
include(":AnimationScaleMod")
50-
include(":AntiBrightnessChange")
51-
include(":AutomaticAdvancedSettingsExpander")
52-
include(":BetterBluetoothDeviceSort")
53-
include(":BetterVerboseWiFiLogging")
54-
include(":ClassHunter")
55-
include(":CodecMod")
56-
include(":DontResetIfBootedAndConnected")
57-
include(":FreeNotifications")
58-
include(":KeepSplitScreenRatio")
59-
include(":MotionEventMod")
60-
include(":MuteSlf4jWarnings")
61-
include(":OpenWifiOnTop")
62-
include(":PersistentForegroundServiceNotifications")
63-
include(":PreventAudioFocus")
64-
include(":ResetAllNotificationChannels")
65-
include(":RotationControl")
66-
include(":UpsideWifi")
47+
apply(from = "modules.gradle.kts")

0 commit comments

Comments
 (0)