Skip to content

Commit eb705e5

Browse files
Update Gradle wrapper to 8.10. Added TOML file with dependencies declarations. Added dependabot config. Fixed ktlint.
1 parent 2ca898f commit eb705e5

File tree

13 files changed

+203
-145
lines changed

13 files changed

+203
-145
lines changed

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gradle"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/build-pr.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ jobs:
66
name: Build and Test
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- uses: actions/setup-java@v3
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-java@v4
1111
with:
1212
distribution: 'zulu'
1313
java-version: 17
1414
- name: Build
15-
uses: eskatos/gradle-command-action@v1
15+
uses: eskatos/gradle-command-action@v3
1616
with:
1717
arguments: build

.github/workflows/publish.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
build:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Set up JDK
22-
uses: actions/setup-java@v3
22+
uses: actions/setup-java@v4
2323
with:
2424
distribution: 'zulu'
2525
java-version: '17'
2626
- name: CopyAars
27-
uses: eskatos/gradle-command-action@v1
27+
uses: eskatos/gradle-command-action@v3
2828
with:
2929
arguments: copyAars
3030
- name: Grant execute permission for gradlew

build.gradle.kts

+26-27
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ plugins {
1616
`java-library`
1717
`maven-publish`
1818
signing
19-
id("org.jetbrains.kotlin.jvm") version "1.9.22"
20-
kotlin("plugin.serialization") version "1.9.22"
21-
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
22-
id("com.github.ben-manes.versions") version "0.42.0"
19+
alias(libs.plugins.kotlin.jvm)
20+
alias(libs.plugins.kotlinx.serialization)
21+
alias(libs.plugins.jlleitschuh.ktlint)
22+
alias(libs.plugins.ben.manes.versions)
2323
}
2424

2525
group = "dev.gitlive"
@@ -144,34 +144,33 @@ publishing {
144144
}
145145

146146
dependencies {
147-
compileOnly("org.robolectric:android-all:12.1-robolectric-8229987")
148-
testImplementation("junit:junit:4.13.2")
149-
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.7.3")
150-
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.7.3")
147+
compileOnly(libs.robolectric.android.all)
148+
testImplementation(libs.junit)
149+
testImplementation(libs.kotlinx.coroutines.swing)
150+
testImplementation(libs.kotlinx.coroutines.play.services)
151151
// firebase aars
152-
aar("com.google.firebase:firebase-firestore:24.10.0")
153-
aar("com.google.firebase:firebase-functions:20.4.0")
154-
aar("com.google.firebase:firebase-database:20.3.0")
155-
aar("com.google.firebase:firebase-config:21.6.0")
156-
aar("com.google.firebase:firebase-installations:17.2.0")
152+
aar(libs.google.firebase.firestore)
153+
aar(libs.google.firebase.functions)
154+
aar(libs.google.firebase.database)
155+
aar(libs.google.firebase.config)
156+
aar(libs.google.firebase.installations)
157157
// extracted aar dependencies
158158
// exclude lifecycle libs due to https://github.com/GitLiveApp/firebase-java-sdk/pull/15 - remove the exclude once the dependencies in the aars are updated to the required version
159159
api(fileTree(mapOf("dir" to "build/jar", "include" to listOf("*.jar"), "exclude" to listOf("lifecycle-*"))))
160160
// polyfill dependencies
161-
implementation("org.jetbrains.kotlin:kotlin-stdlib")
162-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
163-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.0")
164-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
165-
implementation("org.xerial:sqlite-jdbc:3.44.1.0")
161+
implementation(libs.kotlinx.coroutines.core)
162+
implementation(libs.kotlinx.serialization.core)
163+
implementation(libs.kotlinx.serialization.json)
164+
implementation(libs.xerial.sqlite.jdbc)
166165
// firebase dependencies
167-
implementation("javax.inject:javax.inject:1")
168-
implementation("com.squareup.okhttp3:okhttp:3.12.13")
169-
implementation("io.grpc:grpc-protobuf-lite:1.52.1")
170-
implementation("io.grpc:grpc-stub:1.52.1")
171-
implementation("androidx.collection:collection:1.2.0")
172-
implementation("io.grpc:grpc-okhttp:1.52.1")
173-
implementation("androidx.lifecycle:lifecycle-common:2.8.0-rc01")
174-
implementation("androidx.lifecycle:lifecycle-viewmodel:2.8.0-rc01")
166+
implementation(libs.javax.inject)
167+
implementation(libs.okhttp)
168+
implementation(libs.io.grpc.protobuf.lite)
169+
implementation(libs.io.grpc.stub)
170+
implementation(libs.androidx.collection)
171+
implementation(libs.io.grpc.okhttp)
172+
implementation(libs.androidx.lifecycle.common)
173+
implementation(libs.androidx.lifecycle.viewmodel)
175174
}
176175

177176
tasks.named("publishToMavenLocal").configure {
@@ -183,7 +182,7 @@ tasks.named("publish").configure {
183182
}
184183

185184
ktlint {
186-
version.set("0.41.0")
185+
version.set(libs.versions.ktlint.get())
187186
}
188187

189188
signing {

gradle/libs.versions.toml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[versions]
2+
androidx-lifecycle = "2.9.0-alpha01"
3+
ben-manes-versions = "0.51.0"
4+
io-grpc = "1.66.0"
5+
jlleitschuh-ktlint = "12.1.1"
6+
kotlin = "2.0.20"
7+
kotlinx-coroutines = "1.8.1"
8+
kotlinx-serialization = "1.7.1"
9+
ktlint = "0.47.1"
10+
11+
[libraries]
12+
androidx-collection = { module = "androidx.collection:collection", version = "1.4.3" }
13+
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "androidx-lifecycle" }
14+
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "androidx-lifecycle" }
15+
google-firebase-config = { module = "com.google.firebase:firebase-config", version = "21.6.0" }
16+
google-firebase-database = { module = "com.google.firebase:firebase-database", version = "20.3.0" }
17+
google-firebase-firestore = { module = "com.google.firebase:firebase-firestore", version = "24.10.0" }
18+
google-firebase-functions = { module = "com.google.firebase:firebase-functions", version = "20.4.0" }
19+
google-firebase-installations = { module = "com.google.firebase:firebase-installations", version = "17.2.0" }
20+
io-grpc-okhttp = { module = "io.grpc:grpc-okhttp", version.ref = "io-grpc" }
21+
io-grpc-protobuf-lite = { module = "io.grpc:grpc-protobuf-lite", version.ref = "io-grpc" }
22+
io-grpc-stub = { module = "io.grpc:grpc-stub", version.ref = "io-grpc" }
23+
javax-inject = { module = "javax.inject:javax.inject", version = "1" }
24+
junit = { module = "junit:junit", version = "4.13.2" }
25+
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
26+
kotlinx-coroutines-play-services = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "kotlinx-coroutines" }
27+
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" }
28+
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
29+
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
30+
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "3.12.13" }
31+
robolectric-android-all = { module = "org.robolectric:android-all", version = "14-robolectric-10818077" }
32+
xerial-sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version = "3.46.1.0" }
33+
34+
[plugins]
35+
ben-manes-versions = { id = "com.github.ben-manes.versions", version.ref = "ben-manes-versions" }
36+
jlleitschuh-ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "jlleitschuh-ktlint" }
37+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
38+
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

gradle/wrapper/gradle-wrapper.jar

-17.6 KB
Binary file not shown.
+2-1
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-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

+21-13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +85,9 @@ done
8385
# This is normally unused
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87-
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"'
88+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
9091

9192
# Use the maximum available, or set MAX_FD != -1 to use that value.
9293
MAX_FD=maximum
@@ -133,26 +134,29 @@ location of your Java installation."
133134
fi
134135
else
135136
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.
137+
if ! command -v java >/dev/null 2>&1
138+
then
139+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137140
138141
Please set the JAVA_HOME variable in your environment to match the
139142
location of your Java installation."
143+
fi
140144
fi
141145

142146
# Increase the maximum file descriptors if we can.
143147
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144148
case $MAX_FD in #(
145149
max*)
146150
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
151+
# shellcheck disable=SC2039,SC3045
148152
MAX_FD=$( ulimit -H -n ) ||
149153
warn "Could not query maximum file descriptor limit"
150154
esac
151155
case $MAX_FD in #(
152156
'' | soft) :;; #(
153157
*)
154158
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
159+
# shellcheck disable=SC2039,SC3045
156160
ulimit -n "$MAX_FD" ||
157161
warn "Could not set maximum file descriptor limit to $MAX_FD"
158162
esac
@@ -197,11 +201,15 @@ if "$cygwin" || "$msys" ; then
197201
done
198202
fi
199203

200-
# Collect all arguments for the java command;
201-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202-
# shell script including quotes and variable substitutions, so put them in
203-
# double quotes to make sure that they get re-expanded; and
204-
# * put everything else in single quotes, so that it's not re-expanded.
204+
205+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207+
208+
# Collect all arguments for the java command:
209+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210+
# and any embedded shellness will be escaped.
211+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212+
# treated as '${Hostname}' itself on the command line.
205213

206214
set -- \
207215
"-Dorg.gradle.appname=$APP_BASE_NAME" \

0 commit comments

Comments
 (0)