From a9c835bcb07e6e49e346cc1bcd890fabac2161ba Mon Sep 17 00:00:00 2001 From: kai-morich Date: Tue, 4 Jul 2023 20:46:36 +0200 Subject: [PATCH] gradle 8.0 --- .github/workflows/build.yml | 4 ++-- .idea/compiler.xml | 2 +- .idea/misc.xml | 2 +- build.gradle | 2 +- gradle.properties | 1 + gradle/wrapper/gradle-wrapper.properties | 2 +- jitpack.yml | 2 +- usbSerialExamples/build.gradle | 2 +- usbSerialForAndroid/build.gradle | 25 ++++++++++++------------ 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 071e38d..8a1e55b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: set up JDK 1.11 + - name: set up JDK 1.17 uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Build with Gradle run: ./gradlew assembleDebug diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index d03eb16..367b49b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -46,7 +46,7 @@ - + diff --git a/build.gradle b/build.gradle index 18aaeb2..a7bf2cf 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.0.2' } } diff --git a/gradle.properties b/gradle.properties index dbb7bf7..340f070 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ android.enableJetifier=true android.useAndroidX=true +android.defaults.buildfeatures.buildconfig=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac721e1..66c9cdb 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-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip diff --git a/jitpack.yml b/jitpack.yml index c57bf18..31c9f38 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,4 +1,4 @@ jdk: - - openjdk11 + - openjdk17 install: - ./gradlew :usbSerialForAndroid:publishToMavenLocal diff --git a/usbSerialExamples/build.gradle b/usbSerialExamples/build.gradle index 36ec1ef..2f442b1 100644 --- a/usbSerialExamples/build.gradle +++ b/usbSerialExamples/build.gradle @@ -29,5 +29,5 @@ android { dependencies { implementation project(':usbSerialForAndroid') implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.8.0' + implementation 'com.google.android.material:material:1.9.0' } diff --git a/usbSerialForAndroid/build.gradle b/usbSerialForAndroid/build.gradle index 30199a8..ed91fca 100644 --- a/usbSerialForAndroid/build.gradle +++ b/usbSerialForAndroid/build.gradle @@ -13,7 +13,7 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments = [ // Raspi Windows LinuxVM ... - 'rfc2217_server_host': '192.168.0.144', + 'rfc2217_server_host': '192.168.0.145', 'rfc2217_server_nonstandard_baudrates': 'true', // true false false ] } @@ -22,17 +22,22 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } namespace 'com.hoho.android.usbserial' + publishing { + // if coverage is enabled, change 'release' to 'anyDeviceRelease' or comment out publishing rule + singleVariant('release') { + withSourcesJar() + } + } } dependencies { implementation "androidx.annotation:annotation:1.5.0" - //testImplementation 'androidx.test:core:1.5.0' testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:1.10.19' + testImplementation 'org.mockito:mockito-core:5.4.0' androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation 'androidx.test:runner:1.5.2' - androidTestImplementation 'commons-net:commons-net:3.8.0' - androidTestImplementation 'org.apache.commons:commons-lang3:3.11' + androidTestImplementation 'commons-net:commons-net:3.9.0' + androidTestImplementation 'org.apache.commons:commons-lang3:3.12.0' } // gradle task: publishToMavenLocal @@ -40,21 +45,15 @@ project.afterEvaluate { publishing { publications { release(MavenPublication) { - from components.release // change 'release' to 'anyDeviceRelease' if coverage is enabled - artifact androidSourcesJar + from components.release // values used for local maven repo, jitpack uses github release: groupId 'com.github.mik3y' artifactId 'usb-serial-for-android' - version '3.5.0beta' + version '3.5.2beta' } } } } -task androidSourcesJar(type: Jar) { - classifier 'sources' - from android.sourceSets.main.java.srcDirs -} - //apply from: 'coverage.gradle'