forked from bisq-network/bisq2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove bitcoind's dependency to root build-logic module
We can't depend on Bisq 2's build-logic module to be able to reuse the wallets library in Bisq 1.
- Loading branch information
Showing
5 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
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,11 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation(libs.protobuf.gradle.plugin) | ||
} |
59 changes: 59 additions & 0 deletions
59
wallets/bitcoind/build-logic/commons/src/main/kotlin/bisq.java-conventions.gradle.kts
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,59 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://jitpack.io") | ||
} | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(11)) | ||
} | ||
} | ||
|
||
tasks { | ||
test { | ||
useJUnitPlatform() | ||
} | ||
} | ||
|
||
val versionCatalog = extensions.getByType<VersionCatalogsExtension>().named("libs") | ||
dependencies { | ||
versionCatalog.findLibrary("google-guava").ifPresent { | ||
implementation(it) | ||
} | ||
|
||
versionCatalog.findLibrary("lombok").ifPresent { | ||
compileOnly(it) | ||
annotationProcessor(it) | ||
testAnnotationProcessor(it) | ||
testCompileOnly(it) | ||
} | ||
|
||
versionCatalog.findLibrary("slf4j-api").ifPresent { | ||
implementation(it) | ||
} | ||
|
||
versionCatalog.findLibrary("logback-core").ifPresent { | ||
implementation(it) | ||
} | ||
versionCatalog.findLibrary("logback-classic").ifPresent { | ||
implementation(it) | ||
} | ||
|
||
versionCatalog.findLibrary("junit-jupiter").ifPresent { | ||
testImplementation(it) | ||
} | ||
|
||
versionCatalog.findLibrary("assertj-core").ifPresent { | ||
testImplementation(it) | ||
} | ||
|
||
versionCatalog.findLibrary("mockito").ifPresent { | ||
testImplementation(it) | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
wallets/bitcoind/build-logic/commons/src/main/kotlin/bisq.java-integration-tests.gradle.kts
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,59 @@ | ||
plugins { | ||
java | ||
} | ||
|
||
sourceSets { | ||
create("integrationTest") { | ||
compileClasspath += sourceSets.main.get().output | ||
runtimeClasspath += sourceSets.main.get().output | ||
} | ||
} | ||
|
||
val integrationTestImplementation by configurations.getting { | ||
extendsFrom(configurations.implementation.get()) | ||
} | ||
|
||
val integrationTestRuntimeOnly by configurations.getting | ||
configurations["integrationTestRuntimeOnly"].extendsFrom(configurations.runtimeOnly.get()) | ||
|
||
val versionCatalog = extensions.getByType<VersionCatalogsExtension>().named("libs") | ||
dependencies { | ||
versionCatalog.findLibrary("lombok").ifPresent { | ||
"integrationTestAnnotationProcessor"(it) | ||
"integrationTestCompileOnly"(it) | ||
} | ||
|
||
versionCatalog.findLibrary("slf4j-api").ifPresent { | ||
"integrationTestImplementation"(it) | ||
} | ||
|
||
versionCatalog.findLibrary("logback-core").ifPresent { | ||
"integrationTestImplementation"(it) | ||
} | ||
versionCatalog.findLibrary("logback-classic").ifPresent { | ||
"integrationTestImplementation"(it) | ||
} | ||
|
||
versionCatalog.findLibrary("junit-jupiter").ifPresent { | ||
"integrationTestImplementation"(it) | ||
} | ||
|
||
versionCatalog.findLibrary("assertj-core").ifPresent { | ||
"integrationTestImplementation"(it) | ||
} | ||
} | ||
|
||
tasks.register<Test>("integrationTest") { | ||
description = "Runs integration tests." | ||
group = "verification" | ||
|
||
testClassesDirs = sourceSets["integrationTest"].output.classesDirs | ||
classpath = sourceSets["integrationTest"].runtimeClasspath | ||
shouldRunAfter("test") | ||
|
||
useJUnitPlatform() | ||
|
||
testLogging { | ||
events("passed") | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
wallets/bitcoind/build-logic/commons/src/main/kotlin/bisq.java-library.gradle.kts
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,3 @@ | ||
plugins { | ||
id("bisq.java-conventions") | ||
} |
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