scottyab / rootbeer

Simple to use root checking Android library and sample app
Apache License 2.0
2.5k stars 442 forks source link

Tidy and optimise Gradle #238

Closed NiallScott closed 1 month ago

NiallScott commented 2 months ago

The aim of this PR is to clean up the Gradle scripts and provide some build optimisations.


The optimisations are introduced by enabling Gradle configuration and build cache. These can be observed in the root gradle.properties file with the following properties defined;

org.gradle.configuration-cache=true
org.gradle.caching=true

This seems to run fine locally on my machine. This is not surprising given the Gradle setup is quite basic so everything is compatible with caching. However, be aware of possible future issues if incompatible plugins are introduced.

It running on CI, it might be wise to run it with these turned off, like so: ./gradlew --no-daemon --no-configuration-cache --no-build-cache


Proguard files which contained no meaningful contents have been removed. This is so that source files which provide no meaningful benefit don't cause any distraction and are not a future maintenance headache.


Common Java/Kotlin/Android setup has been rationalised in to the root build.gradle.kts file, so that repetition is avoided in the sub-projects and also to manage the application of consistency in project module setup.


Also;