diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 77145c69..8d5c7f26 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Cache Grade dependencies uses: actions/cache@v1 with: diff --git a/app/build.gradle b/app/build.gradle index 26c8fe00..bfd089ed 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,13 +27,13 @@ repositories { } android { - compileSdkVersion 33 + compileSdk 33 ndkVersion '21.3.6528147' defaultConfig { applicationId "tech.relaycorp.courier" - minSdkVersion 23 - targetSdkVersion 33 + minSdk 23 + targetSdk 33 versionCode 1 versionName project.findProperty("versionName") ?: "0.1" @@ -78,11 +78,11 @@ android { } compileOptions { coreLibraryDesugaringEnabled true - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_17 } packagingOptions { jniLibs { diff --git a/app/jacoco.gradle b/app/jacoco.gradle index 55e5315c..9d576a76 100644 --- a/app/jacoco.gradle +++ b/app/jacoco.gradle @@ -46,11 +46,11 @@ task jacocoAndroidTestReport(type: JacocoReport) { } reports { - html.enabled true + html.required = true html.destination file("${buildDir}/reports/coverage") - xml.enabled true + xml.required = true xml.destination file("${buildDir}/reports/coverage.xml") - csv.enabled false + csv.required = false } doLast { diff --git a/app/src/test/java/tech/relaycorp/cogrpc/server/CogRPCServerCollectCargoTest.kt b/app/src/test/java/tech/relaycorp/cogrpc/server/CogRPCServerCollectCargoTest.kt index 0676677a..005f4d3a 100644 --- a/app/src/test/java/tech/relaycorp/cogrpc/server/CogRPCServerCollectCargoTest.kt +++ b/app/src/test/java/tech/relaycorp/cogrpc/server/CogRPCServerCollectCargoTest.kt @@ -133,19 +133,19 @@ internal class CogRPCServerCollectCargoTest { private fun buildClient() = CargoRelayGrpc.newStub(testServer.channel) private fun buildClientWithCCA(cca: ByteArray = "CCA".toByteArray()) = - MetadataUtils.attachHeaders( - buildClient(), - AuthorizationMetadata.makeMetadata(cca) + buildClient().withInterceptors( + MetadataUtils.newAttachHeadersInterceptor(AuthorizationMetadata.makeMetadata(cca)) ) private fun buildClientWithInvalidAuthorization() = - MetadataUtils.attachHeaders( - buildClient(), - Metadata().also { - it.put( - Metadata.Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER), - "INVALID" - ) - } + buildClient().withInterceptors( + MetadataUtils.newAttachHeadersInterceptor( + Metadata().also { + it.put( + Metadata.Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER), + "INVALID" + ) + } + ) ) } diff --git a/build.gradle b/build.gradle index 7aa3f454..f23e4651 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { ext { kotlinVersion = '1.8.10' kotlinCoroutinesVersion = '1.6.4' - grpcVersion = '1.54.0' + grpcVersion = '1.59.0' nettyVersion = '4.1.78.Final' aboutLibsVersion = '8.6.3' junitVersion = '5.9.0' @@ -16,7 +16,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.1.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.7.2' classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$aboutLibsVersion" diff --git a/gradle.properties b/gradle.properties index 64265023..b4e2362d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,3 +20,6 @@ android.enableJetifier=true android.jetifier.ignorelist=bouncycastle # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbf..c1962a79 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33c..0c85a1f7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d..aeb74cbb 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -144,7 +141,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +149,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in