From 07503d2a02e414b8951603c9d1efaf40a6454ed7 Mon Sep 17 00:00:00 2001 From: storytellerF <34095089+storytellerF@users.noreply.github.com> Date: Wed, 14 Feb 2024 00:48:31 +0800 Subject: [PATCH] bump jdk17,agp 8.2.2; append proguard rule[dontwarn] --- .github/workflows/android.yml | 8 +++++ build.gradle | 43 ++++++++++++++++++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- jitpack.yml | 2 ++ proguard-rules.pro | 7 ++++ 5 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 jitpack.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 8d50950..8619125 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,5 +9,13 @@ jobs: steps: - uses: actions/checkout@v1 + + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + - name: Run tests run: ./gradlew lint test diff --git a/build.gradle b/build.gradle index 2dd369b..afcfe13 100644 --- a/build.gradle +++ b/build.gradle @@ -1,37 +1,66 @@ buildscript { repositories { - jcenter() + mavenCentral() google() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:8.2.2' } } repositories { - jcenter() + mavenCentral() google() } apply plugin: 'com.android.library' +apply plugin: 'maven-publish' android { - compileSdkVersion 30 + compileSdk 34 defaultConfig { minSdkVersion 15 consumerProguardFiles 'proguard-rules.pro' } + namespace "com.thegrizzlylabs.sardineandroid" + + def javaVersion = JavaVersion.VERSION_17 + compileOptions { + sourceCompatibility javaVersion + targetCompatibility javaVersion + } + publishing { + singleVariant("release") { + withSourcesJar() + } + } } dependencies { - api 'com.squareup.okhttp3:okhttp:4.9.0' + api 'com.squareup.okhttp3:okhttp:4.12.0' - implementation ('org.simpleframework:simple-xml:2.7.1') { + implementation('org.simpleframework:simple-xml:2.7.1') { exclude module: 'stax' exclude module: 'stax-api' exclude module: 'xpp3' } - testImplementation 'junit:junit:4.13' + testImplementation 'junit:junit:4.13.2' } +//fixme uncomment this for print deprecation info +//tasks.withType(JavaCompile) { +// options.compilerArgs = +// options.compilerArgs + ["-Xlint:deprecation", "-Xlint:unchecked"] +//} +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + afterEvaluate { + from components.release + } + } + } + } +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5065e51..be65230 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..1e41e00 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk17 \ No newline at end of file diff --git a/proguard-rules.pro b/proguard-rules.pro index 1b05362..8874888 100644 --- a/proguard-rules.pro +++ b/proguard-rules.pro @@ -12,3 +12,10 @@ ## OkHTTP -dontwarn okhttp3.internal.platform.ConscryptPlatform + +-dontwarn org.simpleframework.xml.Element +-dontwarn org.simpleframework.xml.ElementList +-dontwarn org.simpleframework.xml.ElementListUnion +-dontwarn org.simpleframework.xml.Namespace +-dontwarn org.simpleframework.xml.Root +-dontwarn org.simpleframework.xml.convert.Converter \ No newline at end of file