Skip to content

Commit

Permalink
Gradle: Use Java 11, Android Gradle Plugin 8.0.2 & update all depende…
Browse files Browse the repository at this point in the history
…ncies.
  • Loading branch information
vanniktech committed Jul 2, 2023
1 parent 06681bb commit 3b4406a
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 39 deletions.
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ continuation_indent_size=2
insert_final_newline=true
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
ktlint_disabled_rules=annotation,argument-list-wrapping,spacing-between-declarations-with-annotations,filename
ktlint_standard_annotation=disabled
ktlint_standard_argument-list-wrapping=disabled
ktlint_standard_spacing-between-declarations-with-annotations=disabled
ktlint_standard_filename=disabled
ktlint_standard_property-naming=disabled
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
java_version: [11]
java_version: [17]

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install JDK 11
- name: Install JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: gradle/gradle-build-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install JDK 11
- name: Install JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup gradle
uses: gradle/gradle-build-action@v2
Expand Down
17 changes: 8 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.gradle.api.internal.project.ProjectInternal

buildscript {
ext.kotlinVersion = '1.8.22'
ext.androidGradlePluginVersion = '7.3.1'
ext.androidGradlePluginVersion = '8.0.2'

repositories {
mavenCentral()
Expand All @@ -30,10 +30,10 @@ validatePlugins {

codeQualityTools {
ktlint {
toolVersion = '0.47.1'
toolVersion = '0.50.0'
}
detekt {
toolVersion = '1.0.0'
enabled = false
}
pmd {
enabled = false
Expand Down Expand Up @@ -96,15 +96,14 @@ dependencies {
testRuntimeOnly(files(toolingApiBuildersJar))
}

sourceCompatibility = JavaVersion.VERSION_1_8
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

tasks.withType(Test) {
testLogging {
testLogging.exceptionFormat = 'full'
}
}

wrapper {
gradleVersion = '7.6.2'
distributionType = Wrapper.DistributionType.ALL
}
17 changes: 0 additions & 17 deletions code_quality_tools/detekt.yml

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 10 additions & 6 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 @@ -133,26 +130,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
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 +197,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 3b4406a

Please sign in to comment.