diff --git a/.idea/gradle.xml b/.idea/gradle.xml index ca65f7a..dd49f5e 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -22,7 +22,6 @@ diff --git a/README.md b/README.md index 49783f3..686299f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # 🍴 LocalNode: get Hardhat and Foundry Anvil integrated in your Java/Kotlin app -[![build status](https://github.com/ruXlab/pokefork/actions/workflows/tests.yml/badge.svg)](https://github.com/ruXlab/pokefork/actions) +[![build status](https://github.com/ruXlab/localnode/actions/workflows/tests.yml/badge.svg)](https://github.com/ruXlab/localnode/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Maven Central](https://img.shields.io/maven-central/v/vc.rux.pokefork/ktx-module.svg)](https://search.maven.org/artifact/vc.rux.pokefork/web3j) +[![Maven Central](https://img.shields.io/maven-central/v/vc.rux.pokefork/ktx-module.svg)](https://search.maven.org/artifact/vc.rux.localnode/localnode) LocalNode allows to run a local development or forked node of the Ethereum-like network diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 07e6d7a..8fd0016 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -7,11 +7,13 @@ version = "0.0-SNAPSHOT" repositories { mavenCentral() - maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/") // optional for snapshots +// maven(url = "https://s01.oss.sonatype.org/content/repositories/releases/") // optional for releases +// maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/") // optional for snapshots +// maven(url = "https://s01.oss.sonatype.org/content/groups/staging/") // optional for staging } dependencies { - implementation("vc.rux.localnode:web3j:0.1.0") + implementation("vc.rux.localnode:localnode:0.1.0") implementation("org.web3j:core:4.10.3") } diff --git a/examples/src/main/kotlin/QueryBalanceApp.kt b/examples/src/main/kotlin/QueryBalanceApp.kt index c8770f3..e1c76cd 100644 --- a/examples/src/main/kotlin/QueryBalanceApp.kt +++ b/examples/src/main/kotlin/QueryBalanceApp.kt @@ -3,9 +3,9 @@ import misc.archiveNodeUrl import org.web3j.protocol.core.DefaultBlockParameter import org.web3j.utils.Convert.Unit import org.web3j.utils.Convert.fromWei -import vc.rux.pokefork.anvil.AnvilNode -import vc.rux.pokefork.anvil.AnvilNodeConfig -import vc.rux.pokefork.web3j.LocalWeb3jNode +import vc.rux.localnode.anvil.AnvilNode +import vc.rux.localnode.anvil.AnvilNodeConfig +import vc.rux.localnode.web3j.LocalWeb3jNode object QueryBalanceApp { @JvmStatic diff --git a/plugins/src/main/kotlin/publication.gradle.kts b/plugins/src/main/kotlin/publication.gradle.kts index 7dcd2cf..0fe2d75 100644 --- a/plugins/src/main/kotlin/publication.gradle.kts +++ b/plugins/src/main/kotlin/publication.gradle.kts @@ -108,9 +108,10 @@ publishing { } signing { - val signingKey = project.ext["signing.key"] as? String - val signingPassword = project.ext["signing.password"] as? String - val keyFilePath = project.ext["signing.secretKeyRingFile"] as? String + fun getProp(name: String) = runCatching { project.ext[name] }.getOrNull() as? String + val signingKey = getProp("signing.keyId") + val signingPassword = getProp("signing.password") + val keyFilePath = getProp("signing.secretKeyRingFile") if (signingKey != null && signingPassword != null && keyFilePath != null) { val keyContent = File(keyFilePath).readText() diff --git a/settings.gradle.kts b/settings.gradle.kts index e5c336b..e4e39ab 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -41,6 +41,5 @@ dependencyResolutionManagement { } } -include("web3j") include("localnode") include("examples") diff --git a/web3j/build.gradle.kts b/web3j/build.gradle.kts deleted file mode 100644 index 90f52c4..0000000 --- a/web3j/build.gradle.kts +++ /dev/null @@ -1,71 +0,0 @@ -import org.gradle.api.tasks.testing.logging.TestLogEvent - -plugins { - kotlin("jvm") - id("publication") - `maven-publish` - signing -} - -group = "vc.rux.localnode" -version = "0.0-SNAPSHOT" - -repositories { - mavenCentral() -} - -dependencies { - api(project(":localnode")) - implementation(libs.web3j) - implementation(libs.bundles.logging) - - testImplementation(libs.web3j.contracts) - testImplementation(platform(testlibs.junit.bom)) - testImplementation(testlibs.junit.api) - testImplementation(testlibs.junit.params) - testRuntimeOnly(testlibs.junit.engine) - testImplementation(testlibs.assertk) -} - -tasks.test { - useJUnitPlatform() - testLogging { - events = mutableSetOf( - TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED - ) - } -} - -kotlin { - -} - -java { - withJavadocJar() - withSourcesJar() -} - -tasks.jar { - dependsOn(":core:jar") - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - - // Include the content of the :core module in the JAR - from(configurations.runtimeClasspath.get() - .filter { it.absolutePath.contains("vc/rux/localnode/core") }) -// configurations.runtimeClasspath.get().forEach { -// println("runtimeClasspath: $it") -// } - // get jar generated by :core module - project(":core").configurations.runtimeClasspath.get().forEach { - if (it.absolutePath.contains("core")) - println("core runtimeClasspath: $it") - } - -// project(":core").configurations..get().forEach { -// println("core archives: $it") -// } - - - from(configurations.runtimeClasspath.get() - .filter { it.absolutePath.contains("vc/rux/localnode") && !it.absolutePath.contains("examples/") }) -} diff --git a/web3j/src/test/resources/logback.xml b/web3j/src/test/resources/logback.xml deleted file mode 100644 index 968b469..0000000 --- a/web3j/src/test/resources/logback.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - \ No newline at end of file