Skip to content

Commit c1ad58a

Browse files
committed
refactor: Read patch version from root project directory
The patch version is now read from `rootProject.file("revanced-patches/gradle.properties")` instead of `File("revanced-patches/gradle.properties")`. This ensures that the `gradle.properties` file is correctly located regardless of the current working directory during the build process.
1 parent c10b24c commit c1ad58a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android {
1919
versionCode = 23
2020
versionName = "1.0.$versionCode"
2121
val patchVersion = Properties().apply {
22-
File("revanced-patches/gradle.properties").inputStream().use { load(it) }
22+
rootProject.file("revanced-patches/gradle.properties").inputStream().use { load(it) }
2323
}["version"]
2424
buildConfigField("String", "PATCH_VERSION", "\"$patchVersion\"")
2525
}

0 commit comments

Comments
 (0)