Skip to content

Commit

Permalink
Update to Gradle and AGP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sdsantos committed Nov 23, 2023
1 parent f9b00ac commit 34e8a45
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions app/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
}
)
)
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
11 changes: 6 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -144,15 +141,15 @@ 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
case $MAX_FD in #(
'' | 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 34e8a45

Please sign in to comment.