From 08a512c5c66ac6d2b60d2c0a5717382ece29c7b5 Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Fri, 10 Apr 2020 12:05:22 -0700 Subject: [PATCH 1/2] Do not fail with no local.properties --- libsuperuser/build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libsuperuser/build.gradle b/libsuperuser/build.gradle index a96bdba..6216b9c 100644 --- a/libsuperuser/build.gradle +++ b/libsuperuser/build.gradle @@ -10,7 +10,7 @@ android { minSdkVersion 5 targetSdkVersion 26 } - + sourceSets { main { manifest.srcFile 'AndroidManifest.xml' @@ -32,7 +32,9 @@ group = "eu.chainfire" bintray { Properties properties = new Properties() - properties.load(project.rootProject.file('local.properties').newDataInputStream()) + if (project.rootProject.file('local.properties').exists()) { + properties.load(project.rootProject.file('local.properties').newDataInputStream()) + } user = properties.getProperty('bintray.user') key = properties.getProperty('bintray.apikey') From 35c6a15ccb6527df4c57544bb7d690406e07341a Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Fri, 10 Apr 2020 11:49:00 -0700 Subject: [PATCH 2/2] Enable basic GitHub Actions CI --- .github/workflows/ci.yml | 12 ++++++++++++ README.md | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..44f1e65 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,12 @@ +name: ci +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 1.8 + - uses: gradle/wrapper-validation-action@v1 + - run: ./gradlew build diff --git a/README.md b/README.md index 0ccc942..93c3c27 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +# librootjava + +[![ci][1]][2] + Example code for "How-To SU" For some outdated background details, see: @@ -418,3 +422,6 @@ dependencies { implementation 'eu.chainfire:libsuperuser:1.0.0.+' } ``` + +[1]: https://github.com/Chainfire/libsuperuser/workflows/ci/badge.svg +[2]: https://github.com/Chainfire/libsuperuser/actions