Skip to content

Commit

Permalink
Add 'regenerate' argument to build and test gradle tasks (#158)
Browse files Browse the repository at this point in the history
* Add 'rebuild' argument to build and test gradle tasks

* Rename 'rebuild' gradle task argument to 'regenerate'

* Add TODO to generateBindings gradle task. Version bump
  • Loading branch information
sergiupuhalschi-rdx authored Jun 5, 2024
1 parent 9edd1ad commit f6f1ef4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sargon"
version = "1.0.8"
version = "1.0.9"
edition = "2021"
build = "build.rs"

Expand Down
6 changes: 6 additions & 0 deletions jvm/sargon-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ android.libraryVariants.all {
"generate${buildTypeUpper}UniFFIBindings",
Exec::class
) {
val regenerate = properties["regenerate"] ?: true //TODO improve by using gradle outputs

onlyIf {
regenerate == true || !File("${buildDir}/generated/src/${buildType}/java").exists()
}

group = BasePlugin.BUILD_GROUP

workingDir = rootDir.parentFile
Expand Down

0 comments on commit f6f1ef4

Please sign in to comment.