Skip to content

Commit

Permalink
chore: use simpler gradle configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Oct 18, 2024
1 parent 8755744 commit 01e4ffe
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 55 deletions.
1 change: 1 addition & 0 deletions bitcoin-ffi-jvm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

# Ignore Gradle build output directory
build
bitcoin.kt
18 changes: 0 additions & 18 deletions bitcoin-ffi-jvm/build.gradle.kts

This file was deleted.

31 changes: 4 additions & 27 deletions bitcoin-ffi-jvm/lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,25 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR
import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT

// library version is defined in gradle.properties
val libraryVersion: String by project
group = "org.bitcoindevkit.bitcoinffi"
version = "0.1.3-SNAPSHOT"

plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id("org.jetbrains.kotlin.jvm") version "1.7.10"

// Apply the java-library plugin for API and implementation separation.
id("java-library")
id("maven-publish")
id("org.jetbrains.kotlin.jvm") version "2.0.10"
id("org.gradle.maven-publish")
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
}

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}

java {
withSourcesJar()
withJavadocJar()
}

dependencies {
// Use the Kotlin JUnit 5 integration.
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")

// Use the JUnit 5 integration.
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.9.1")

// // This dependency is exported to consumers, that is to say found on their compile classpath.
// api("org.apache.commons:commons-math3:3.6.1")

// // This dependency is used internally, and not exposed to consumers on their own compile classpath.
// implementation("com.google.guava:guava:31.1-jre")
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))

// Use the Kotlin JDK 8 standard library.
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")

implementation("net.java.dev.jna:jna:5.12.0")
}

Expand Down
21 changes: 12 additions & 9 deletions bitcoin-ffi-jvm/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/*
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user manual at https://docs.gradle.org/7.6/userguide/multi_project_builds.html
*/

rootProject.name = "bitcoin-ffi-jvm"
include("lib")

pluginManagement {
repositories {
gradlePluginPortal()
}
}

dependencyResolutionManagement {
repositories {
mavenCentral()
}
}
2 changes: 1 addition & 1 deletion scripts/uniffi_bindgen_generate_kotlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ fi
mkdir -p "$PROJECT_DIR"/lib/src/main/kotlin/"$PACKAGE_DIR" || exit 1
$UNIFFI_BINDGEN_BIN generate src/bitcoin.udl --language kotlin -o "$TARGET_DIR" || exit 1

cp "$TARGET_DIR"/"$PACKAGE_DIR"/bitcoin.kt "$PROJECT_DIR"/lib/src/main/kotlin/"$PACKAGE_DIR"/bitcoinffi.kt || exit 1
cp "$TARGET_DIR"/"$PACKAGE_DIR"/bitcoin.kt "$PROJECT_DIR"/lib/src/main/kotlin/"$PACKAGE_DIR"/bitcoin.kt || exit 1

0 comments on commit 01e4ffe

Please sign in to comment.