Skip to content

Commit a925487

Browse files
authored
Gradle: Use Java 11, Android Gradle Plugin 8.0.2 & update all dependencies. (#273)
1 parent 06681bb commit a925487

File tree

9 files changed

+30
-39
lines changed

9 files changed

+30
-39
lines changed

.editorconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ continuation_indent_size=2
44
insert_final_newline=true
55
ij_kotlin_allow_trailing_comma=true
66
ij_kotlin_allow_trailing_comma_on_call_site=true
7-
ktlint_disabled_rules=annotation,argument-list-wrapping,spacing-between-declarations-with-annotations,filename
7+
ktlint_standard_annotation=disabled
8+
ktlint_standard_argument-list-wrapping=disabled
9+
ktlint_standard_spacing-between-declarations-with-annotations=disabled
10+
ktlint_standard_filename=disabled
11+
ktlint_standard_property-naming=disabled

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
java_version: [11]
12+
java_version: [17]
1313

1414
steps:
1515
- name: Checkout

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v3
1717

18-
- name: Install JDK 11
18+
- name: Install JDK 17
1919
uses: actions/setup-java@v3
2020
with:
2121
distribution: 'zulu'
22-
java-version: 11
22+
java-version: 17
2323

2424
- name: Setup gradle
2525
uses: gradle/gradle-build-action@v2

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v3
1717

18-
- name: Install JDK 11
18+
- name: Install JDK 17
1919
uses: actions/setup-java@v3
2020
with:
2121
distribution: 'zulu'
22-
java-version: 11
22+
java-version: 17
2323

2424
- name: Setup gradle
2525
uses: gradle/gradle-build-action@v2

build.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import org.gradle.api.internal.project.ProjectInternal
33

44
buildscript {
55
ext.kotlinVersion = '1.8.22'
6-
ext.androidGradlePluginVersion = '7.3.1'
6+
ext.androidGradlePluginVersion = '8.0.2'
77

88
repositories {
99
mavenCentral()
@@ -30,10 +30,10 @@ validatePlugins {
3030

3131
codeQualityTools {
3232
ktlint {
33-
toolVersion = '0.47.1'
33+
toolVersion = '0.50.0'
3434
}
3535
detekt {
36-
toolVersion = '1.0.0'
36+
enabled = false
3737
}
3838
pmd {
3939
enabled = false
@@ -96,15 +96,14 @@ dependencies {
9696
testRuntimeOnly(files(toolingApiBuildersJar))
9797
}
9898

99-
sourceCompatibility = JavaVersion.VERSION_1_8
99+
kotlin {
100+
jvmToolchain {
101+
languageVersion.set(JavaLanguageVersion.of(17))
102+
}
103+
}
100104

101105
tasks.withType(Test) {
102106
testLogging {
103107
testLogging.exceptionFormat = 'full'
104108
}
105109
}
106-
107-
wrapper {
108-
gradleVersion = '7.6.2'
109-
distributionType = Wrapper.DistributionType.ALL
110-
}

code_quality_tools/detekt.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

gradle/wrapper/gradle-wrapper.jar

1.71 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ done
8585
APP_BASE_NAME=${0##*/}
8686
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90-
9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
9390

@@ -133,26 +130,29 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146146
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
147+
# shellcheck disable=SC3045
148148
MAX_FD=$( ulimit -H -n ) ||
149149
warn "Could not query maximum file descriptor limit"
150150
esac
151151
case $MAX_FD in #(
152152
'' | soft) :;; #(
153153
*)
154154
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
155+
# shellcheck disable=SC3045
156156
ulimit -n "$MAX_FD" ||
157157
warn "Could not set maximum file descriptor limit to $MAX_FD"
158158
esac
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
197197
done
198198
fi
199199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
200204
# Collect all arguments for the java command;
201205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202206
# shell script including quotes and variable substitutions, so put them in

0 commit comments

Comments
 (0)