-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2680 from HenrikJannsen/add-support-for-macos-aar…
…ch64-tor-binary Prepare support for macos aarch64 tor binary
- Loading branch information
Showing
10 changed files
with
62 additions
and
41 deletions.
There are no files selected for viewing
13 changes: 8 additions & 5 deletions
13
...-core-binaries/src/main/kotlin/bisq/gradle/bitcoin_core/BitcoinCoreHashFileUrlProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package bisq.gradle.bitcoin_core | ||
|
||
import bisq.gradle.tasks.PerOsUrlProvider | ||
import bisq.gradle.tasks.PerPlatformUrlProvider | ||
|
||
class BitcoinCoreHashFileUrlProvider(private val version: String) : PerOsUrlProvider { | ||
class BitcoinCoreHashFileUrlProvider(private val version: String) : PerPlatformUrlProvider { | ||
override val urlPrefix: String | ||
get() = "https://bitcoincore.org/bin/bitcoin-core-$version/SHA256SUMS" | ||
|
||
override val linuxUrl: String | ||
override val LINUX_X86_64_URL: String | ||
get() = "" | ||
|
||
override val macOsUrl: String | ||
override val MACOS_X86_64_URL: String | ||
get() = "" | ||
|
||
override val windowsUrl: String | ||
override val MACOS_ARM_64_URL: String | ||
get() = "" | ||
|
||
override val WIN_X86_64_URL: String | ||
get() = "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
...logic/electrum-binaries/src/main/kotlin/bisq/gradle/electrum/ElectrumBinaryUrlProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package bisq.gradle.electrum | ||
|
||
import bisq.gradle.tasks.PerOsUrlProvider | ||
import bisq.gradle.tasks.PerPlatformUrlProvider | ||
|
||
class ElectrumBinaryUrlProvider(private val version: String) : PerOsUrlProvider { | ||
class ElectrumBinaryUrlProvider(private val version: String) : PerPlatformUrlProvider { | ||
override val urlPrefix: String | ||
get() = "https://download.electrum.org/$version/" | ||
|
||
override val linuxUrl: String | ||
override val LINUX_X86_64_URL: String | ||
get() = "electrum-$version-x86_64.AppImage" | ||
|
||
override val macOsUrl: String | ||
override val MACOS_X86_64_URL: String | ||
get() = "electrum-$version.dmg" | ||
|
||
override val windowsUrl: String | ||
override val MACOS_ARM_64_URL: String | ||
get() = "electrum-$version.dmg" // No ARM_64 version provided | ||
|
||
override val WIN_X86_64_URL: String | ||
get() = "electrum-$version.exe" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,6 @@ repositories { | |
} | ||
|
||
dependencies { | ||
implementation(project(":commons")) | ||
implementation(libs.bouncycastle.pg) | ||
} |
20 changes: 0 additions & 20 deletions
20
build-logic/gradle-tasks/src/main/kotlin/bisq/gradle/tasks/PerOsUrlProvider.kt
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
build-logic/gradle-tasks/src/main/kotlin/bisq/gradle/tasks/PerPlatformUrlProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package bisq.gradle.tasks | ||
|
||
import bisq.gradle.common.Platform.* | ||
import bisq.gradle.common.getPlatform | ||
|
||
interface PerPlatformUrlProvider { | ||
val urlPrefix: String | ||
|
||
val LINUX_X86_64_URL: String | ||
val MACOS_X86_64_URL: String | ||
val MACOS_ARM_64_URL: String | ||
val WIN_X86_64_URL: String | ||
|
||
val url: String | ||
get() = urlPrefix + getUrlSuffix() | ||
|
||
private fun getUrlSuffix() = | ||
when (getPlatform()) { | ||
LINUX_X86_64 -> LINUX_X86_64_URL | ||
LINUX_ARM_64 -> LINUX_X86_64_URL // No ARM_64 provided | ||
MACOS_X86_64 -> MACOS_X86_64_URL | ||
MACOS_ARM_64 -> MACOS_ARM_64_URL | ||
WIN_X86_64 -> WIN_X86_64_URL | ||
WIN_ARM_64 -> WIN_X86_64_URL // No ARM_64 provided | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 12 additions & 5 deletions
17
build-logic/tor-binary/src/main/kotlin/bisq/gradle/tor_binary/TorBinaryUrlProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
package bisq.gradle.tor_binary | ||
|
||
import bisq.gradle.tasks.PerOsUrlProvider | ||
import bisq.gradle.tasks.PerPlatformUrlProvider | ||
|
||
class TorBinaryUrlProvider(private val version: String) : PerOsUrlProvider { | ||
class TorBinaryUrlProvider(private val version: String) : PerPlatformUrlProvider { | ||
override val urlPrefix: String | ||
get() = "https://archive.torproject.org/tor-package-archive/torbrowser/$version/" | ||
|
||
override val linuxUrl: String | ||
override val LINUX_X86_64_URL: String | ||
get() = "tor-expert-bundle-linux-x86_64-$version.tar.gz" | ||
|
||
override val macOsUrl: String | ||
override val MACOS_X86_64_URL: String | ||
get() = "tor-expert-bundle-macos-x86_64-$version.tar.gz" | ||
|
||
override val windowsUrl: String | ||
override val MACOS_ARM_64_URL: String | ||
// Currently the Tor version for aarch64 does not work, thus we use the x64 version. | ||
// See: https://github.com/bisq-network/bisq2/issues/2679 | ||
// Once resolved we can use the line below. | ||
// get() = "tor-expert-bundle-macos-aarch64-$version.tar.gz" | ||
get() = "tor-expert-bundle-macos-x86_64-$version.tar.gz" | ||
|
||
override val WIN_X86_64_URL: String | ||
get() = "tor-expert-bundle-windows-x86_64-$version.tar.gz" | ||
} |