diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44f1e65..baee9c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,4 +9,5 @@ jobs: with: java-version: 1.8 - uses: gradle/wrapper-validation-action@v1 - - run: ./gradlew build + - run: ./gradlew :librootjava:build + diff --git a/build.gradle b/build.gradle index 9a78710..d168446 100644 --- a/build.gradle +++ b/build.gradle @@ -1,19 +1,19 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:4.1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' } } allprojects { repositories { google() - jcenter() + maven { url 'https://jitpack.io' } + mavenCentral() mavenLocal() } } diff --git a/gradle.properties b/gradle.properties index 1d3591c..9c36dce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,18 +1,15 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit +## For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html - +# # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m +# Default value: -Xmx1024m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - +# # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +# org.gradle.parallel=true +#Sat Feb 05 12:08:52 CET 2022 +#android.enableJetifier=true +android.useAndroidX=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 48effd2..44d10f7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Nov 09 13:15:43 CET 2018 +#Sat Feb 05 12:08:34 CET 2022 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..d1e6c1e --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +install: + - ./gradlew clean :librootjava:install :librootjavadaemon:install diff --git a/librootjava/README.md b/librootjava/README.md index 361ce2f..b866116 100644 --- a/librootjava/README.md +++ b/librootjava/README.md @@ -1,6 +1,6 @@ # libRootJava -[![ci][1]][2] +[![ci][1]][2] [![](https://jitpack.io/v/eu.chainfire/librootjava.svg)](https://jitpack.io/#eu.chainfire/librootjava) Run Java (and Kotlin) code as root! @@ -444,8 +444,23 @@ an Android 10 preview comes out! ## Gradle +Root `build.gradle`: + +``` +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } +} ``` -implementation 'eu.chainfire:librootjava:1.3.1' + +Module `build.gradle`: + +``` +dependencies { + implementation 'eu.chainfire:librootjava:1.3.3' +} ``` ## Notes diff --git a/librootjava/build.gradle b/librootjava/build.gradle index f95c3a4..5ff11ec 100644 --- a/librootjava/build.gradle +++ b/librootjava/build.gradle @@ -1,10 +1,9 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' android { - compileSdkVersion 26 - buildToolsVersion '28.0.3' + compileSdkVersion 30 + buildToolsVersion '30.0.3' defaultConfig { minSdkVersion 21 /* was 14 pre-Binder/AIDL */ targetSdkVersion 26 @@ -51,7 +50,7 @@ ext { gitUrl = 'https://github.com/Chainfire/librootjava.git' issueTrackerUrl = 'https://github.com/Chainfire/librootjava/issues' - libraryVersion = '1.3.1' + libraryVersion = '1.3.3' developerId = 'Chainfire' developerName = 'Jorrit Jongma' @@ -60,9 +59,6 @@ ext { licenseName = 'The Apache Software License, Version 2.0' licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' allLicenses = ["Apache-2.0"] - - bintrayRepo = 'maven' - bintrayName = artifact } task installMavenLocal(type: Upload) { @@ -77,39 +73,9 @@ task installMavenLocal(type: Upload) { } } -// Workaround bintray bug ignoring these from pom and bintray settings version = libraryVersion group = publishedGroupId -bintray { - Properties properties = new Properties() - 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') - - configurations = ['archives'] - dryRun = false - publish = true - pkg { - repo = bintrayRepo - name = libraryName - desc = libraryDescription - websiteUrl = siteUrl - issueTrackerUrl = issueTrackerUrl // doesn't actually work? - vcsUrl = gitUrl - //githubRepo = gitUrl // some more bintray weirdness here, breaks upload - //githubReleaseNotesFile = 'README.md' - licenses = allLicenses - publicDownloadNumbers = true - version { - name = libraryVersion - released = new Date() - } - } -} - install { repositories.mavenInstaller { pom.project { @@ -140,5 +106,3 @@ install { } } } - -bintrayUpload.dependsOn install diff --git a/librootjava/src/main/java/eu/chainfire/librootjava/Logger.java b/librootjava/src/main/java/eu/chainfire/librootjava/Logger.java index 5ad1ee0..b2f81f9 100644 --- a/librootjava/src/main/java/eu/chainfire/librootjava/Logger.java +++ b/librootjava/src/main/java/eu/chainfire/librootjava/Logger.java @@ -23,7 +23,7 @@ @SuppressWarnings({"unused", "WeakerAccess"}) public class Logger { private static String getDefaultLogTag(){ - String tag = BuildConfig.APPLICATION_ID; + String tag = BuildConfig.LIBRARY_PACKAGE_NAME; int p; while ((p = tag.indexOf('.')) >= 0) { tag = tag.substring(p + 1); diff --git a/librootjava_example/build.gradle b/librootjava_example/build.gradle index d4f33ce..fdf499e 100644 --- a/librootjava_example/build.gradle +++ b/librootjava_example/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 26 - buildToolsVersion '28.0.3' + buildToolsVersion '30.0.3' defaultConfig { applicationId "eu.chainfire.librootjava_example" @@ -15,7 +15,6 @@ android { buildTypes { release { minifyEnabled true - useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -28,7 +27,7 @@ dependencies { implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'eu.chainfire:libsuperuser:1.0.0.+' + implementation 'eu.chainfire:libsuperuser:1.1.1' // --- librootjava dependency --- @@ -36,8 +35,8 @@ dependencies { //implementation project(':librootjava') /* Use local Maven repository version, installed by installMavenLocal Gradle task */ - //implementation('eu.chainfire:librootjava:1.3.1-SNAPSHOT') { changing = true } + //implementation('eu.chainfire:librootjava:1.3.3-SNAPSHOT') { changing = true } - /* Use bintray/jcenter version */ - implementation 'eu.chainfire:librootjava:1.3.1' + /* Use jitpack version */ + implementation 'eu.chainfire:librootjava:1.3.3' } diff --git a/librootjavadaemon/README.md b/librootjavadaemon/README.md index 88f3a84..c2f5496 100644 --- a/librootjavadaemon/README.md +++ b/librootjavadaemon/README.md @@ -1,5 +1,7 @@ # libRootJavaDaemon +[![](https://jitpack.io/v/eu.chainfire/librootjava.svg)](https://jitpack.io/#eu.chainfire/librootjava) + Add-on for [libRootJava](../librootjava) to run the root process as a daemon. @@ -150,8 +152,23 @@ on the Android site. ## Gradle +Root `build.gradle`: + +``` +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } +} +``` + +Module `build.gradle`: + ``` -implementation 'eu.chainfire:librootjavadaemon:1.3.1' +dependencies { + implementation 'eu.chainfire.librootjava:librootjavadaemon:1.3.3' +} ``` You should update to the latest libRootJava and libRootJavaDaemon at the diff --git a/librootjavadaemon/build.gradle b/librootjavadaemon/build.gradle index fa108e1..5e9a168 100644 --- a/librootjavadaemon/build.gradle +++ b/librootjavadaemon/build.gradle @@ -1,10 +1,9 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' android { - compileSdkVersion 26 - buildToolsVersion '28.0.3' + compileSdkVersion 30 + buildToolsVersion '30.0.3' defaultConfig { minSdkVersion 21 targetSdkVersion 26 @@ -27,10 +26,10 @@ dependencies { //implementation project(':librootjava') /* Use local Maven repository version, installed by installMavenLocal Gradle task */ - //implementation('eu.chainfire:librootjava:1.3.1-SNAPSHOT') { changing = true } + //implementation('eu.chainfire:librootjava:1.3.3-SNAPSHOT') { changing = true } - /* Use bintray/jcenter version */ - implementation 'eu.chainfire:librootjava:1.3.1' + /* Use jitpack version */ + implementation 'eu.chainfire.librootjava:librootjava:1.3.3' } task sourcesJar(type: Jar) { @@ -64,7 +63,7 @@ ext { gitUrl = 'https://github.com/Chainfire/librootjava.git' issueTrackerUrl = 'https://github.com/Chainfire/librootjava/issues' - libraryVersion = '1.3.1' + libraryVersion = '1.3.3' developerId = 'Chainfire' developerName = 'Jorrit Jongma' @@ -73,9 +72,6 @@ ext { licenseName = 'The Apache Software License, Version 2.0' licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' allLicenses = ["Apache-2.0"] - - bintrayRepo = 'maven' - bintrayName = artifact } task installMavenLocal(type: Upload) { @@ -90,39 +86,9 @@ task installMavenLocal(type: Upload) { } } -// Workaround bintray bug ignoring these from pom and bintray settings version = libraryVersion group = publishedGroupId -bintray { - Properties properties = new Properties() - 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') - - configurations = ['archives'] - dryRun = false - publish = true - pkg { - repo = bintrayRepo - name = libraryName - desc = libraryDescription - websiteUrl = siteUrl - issueTrackerUrl = issueTrackerUrl // doesn't actually work? - vcsUrl = gitUrl - //githubRepo = gitUrl // some more bintray weirdness here, breaks upload - //githubReleaseNotesFile = 'README.md' - licenses = allLicenses - publicDownloadNumbers = true - version { - name = libraryVersion - released = new Date() - } - } -} - install { repositories.mavenInstaller { pom.project { @@ -153,5 +119,3 @@ install { } } } - -bintrayUpload.dependsOn install diff --git a/librootjavadaemon_example/build.gradle b/librootjavadaemon_example/build.gradle index 9d81a7e..af9981a 100644 --- a/librootjavadaemon_example/build.gradle +++ b/librootjavadaemon_example/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 26 - buildToolsVersion '28.0.3' + buildToolsVersion '30.0.3' defaultConfig { applicationId "eu.chainfire.librootjavadaemon_example" @@ -15,7 +15,6 @@ android { buildTypes { release { minifyEnabled true - useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -28,7 +27,7 @@ dependencies { implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'eu.chainfire:libsuperuser:1.0.0.+' + implementation 'eu.chainfire:libsuperuser:1.1.1' // --- librootjava and librootjavadaemon dependencies --- @@ -37,10 +36,10 @@ dependencies { //implementation project(':librootjavadaemon') /* Use local Maven repository version, installed by installMavenLocal Gradle task */ - //implementation('eu.chainfire:librootjava:1.3.1-SNAPSHOT') { changing = true } - //implementation('eu.chainfire:librootjavadaemon:1.3.1-SNAPSHOT') { changing = true } + //implementation('eu.chainfire:librootjava:1.3.3-SNAPSHOT') { changing = true } + //implementation('eu.chainfire:librootjavadaemon:1.3.3-SNAPSHOT') { changing = true } - /* Use bintray/jcenter version */ - implementation 'eu.chainfire:librootjava:1.3.1' - implementation 'eu.chainfire:librootjavadaemon:1.3.1' + /* Use jitpack version */ + implementation 'eu.chainfire:librootjava:1.3.3' + implementation 'eu.chainfire.librootjava:librootjavadaemon:1.3.3' }