Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Gunnerson <[email protected]>
  • Loading branch information
chenxiaolong committed Jan 13, 2025
1 parent d439b7a commit 8d0e36c
Show file tree
Hide file tree
Showing 7 changed files with 387 additions and 391 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
submodules: true

- name: Validate gradle wrapper checksum
uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2

- name: Set up JDK 21
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'temurin'
java-version: 21
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Create release
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: v${{ steps.get_version.outputs.version }}
Expand Down
27 changes: 20 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Andrew Gunnerson
* SPDX-FileCopyrightText: 2023-2025 Andrew Gunnerson
* SPDX-License-Identifier: GPL-3.0-only
*/

Expand Down Expand Up @@ -239,6 +239,14 @@ interface InjectedExecOps {
@get:Inject val execOps: ExecOperations
}

// https://github.com/gradle/gradle/issues/12247
class LazyString(private val source: Lazy<String>) : java.io.Serializable {
constructor(source: () -> String) : this(lazy(source))
constructor(source: Provider<String>) : this(source::get)

override fun toString() = source.value
}

val rcbridge = tasks.register<Exec>("rcbridge") {
val rcbridgeSrcDir = File(rootDir, "rcbridge")
val tempDir = rcbridgeDir.map { it.dir("temp") }
Expand All @@ -252,27 +260,32 @@ val rcbridge = tasks.register<Exec>("rcbridge") {
inputs.properties(
"android.defaultConfig.minSdk" to android.defaultConfig.minSdk,
"android.namespace" to android.namespace,
"android.ndkDirectory" to android.ndkDirectory,
"androidComponents.sdkComponents.ndkDirectory" to
androidComponents.sdkComponents.ndkDirectory.map { it.asFile.absolutePath },
"androidComponents.sdkComponents.sdkDirectory" to
androidComponents.sdkComponents.sdkDirectory.map { it.asFile.absolutePath },
)
outputs.files(
rcbridgeDir.map { it.file("rcbridge.aar") },
rcbridgeDir.map { it.file("rcbridge-sources.jar") },
)

executable = "gomobile"
args = listOf(
args(
"bind",
"-v",
"-o", rcbridgeAar.get().asFile.absolutePath,
"-o", LazyString(rcbridgeAar.map { it.asFile.absolutePath }),
"-target=android",
"-androidapi=${android.defaultConfig.minSdk}",
"-javapkg=${android.namespace}.binding",
".",
)
environment(
"ANDROID_HOME" to android.sdkDirectory,
"ANDROID_NDK_HOME" to android.ndkDirectory,
"TMPDIR" to tempDir.get().asFile.absolutePath,
"ANDROID_HOME" to LazyString(androidComponents.sdkComponents.sdkDirectory
.map { it.asFile.absolutePath }),
"ANDROID_NDK_HOME" to LazyString(androidComponents.sdkComponents.ndkDirectory
.map { it.asFile.absolutePath }),
"TMPDIR" to LazyString(tempDir.map { it.asFile.absolutePath }),
)

if (!environment.containsKey("GOPROXY")) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
activity-ktx = "1.9.3"
android-gradle-plugin = "8.7.3"
android-gradle-plugin = "8.8.0"
appcompat = "1.7.0"
biometric = "1.1.0"
core-ktx = "1.15.0"
Expand Down
Loading

0 comments on commit 8d0e36c

Please sign in to comment.