From fab85c4483ffd2571a0735a4b453b171db90cc71 Mon Sep 17 00:00:00 2001 From: nick avlo Date: Wed, 30 Apr 2025 12:30:22 -0700 Subject: [PATCH 1/3] README updates to build project from source --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e1c354428..1467f7a0f 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,60 @@ To use it in your project, add the following to your pom.xml file. ``` +## Build from source + + $ cd + $ git clone git@github.com:tcheeric/nostr-java.git + $ cd nostr-java + $ git checkout + +
+ unit-tested build (does not require a nostr-relay for testing) + +###### maven + (unix) + $ ./mvnw clean test + $ ./mvnw install -Dmaven.test.skip=true + + (windows) + $ ./mvnw.cmd clean test + $ ./mvnw.cmd install -Dmaven.test.skip=true + + +###### gradle + + (unix) + $ ./gradlew clean test + $ ./gradlew publishToMavenLocal + + (windows) + $ ./gradlew.bat clean test + $ ./gradlew.bat publishToMavenLocal +
+ +
+ integration-tested build (requires a nostr-relay for testing) + +valid relay(s) must **_first_** be defined in [relays.properties](nostr-java-api/src/main/resources/relays.properties) file, then + +###### maven + (unix) + $ ./mvnw clean install + + (windows) + $ ./mvnw.cmd clean install + +###### gradle + (unix) + $ ./gradlew clean check + $ ./gradlew publishToMavenLocal + + (windows) + $ ./gradlew.bat clean check + $ ./gradlew.bat publishToMavenLocal +
+ + ## Examples I recommend having a look at these repositories/module for examples: - [nostr-example](https://github.com/tcheeric/nostr-java/tree/main/nostr-java-examples) module @@ -68,4 +122,4 @@ The following NIPs are supported by the API out-of-the-box: - [NIP-57](https://github.com/nostr-protocol/nips/blob/master/57.md) - [NIP-60](https://github.com/nostr-protocol/nips/blob/master/60.md) - [NIP-61](https://github.com/nostr-protocol/nips/blob/master/61.md) -- [NIP-99](https://github.com/nostr-protocol/nips/blob/master/99.md) \ No newline at end of file +- [NIP-99](https://github.com/nostr-protocol/nips/blob/master/99.md) From 88e1c5a342f757e66bfc38945b77f66d2389ff13 Mon Sep 17 00:00:00 2001 From: nick avlo Date: Wed, 30 Apr 2025 12:43:23 -0700 Subject: [PATCH 2/3] README updates to build project from source --- README.md | 60 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 1467f7a0f..d907b136e 100644 --- a/README.md +++ b/README.md @@ -8,40 +8,33 @@ Nostr-java is a library for generating, signing, and publishing nostr events to - Java 21+ ## Usage -To use it in your project, add the following to your pom.xml file. +To use nostr-java in your project, two options: -```xml - - v0.007.1-alpha - UTF-8 - -``` +Option 1 - add release version and jitpack.io repository to your pom.xml file ```xml - - - jitpack.io - https://jitpack.io - - + + v0.007.1-alpha + UTF-8 + ``` ```xml - - - nostr-java - nostr-java-api - ${nostr-java.version} - - + + + jitpack.io + https://jitpack.io + + ``` +Option 2 - Check out and build project directly from source -## Build from source - - $ cd - $ git clone git@github.com:tcheeric/nostr-java.git - $ cd nostr-java - $ git checkout +```bash +$ cd +$ git clone git@github.com:tcheeric/nostr-java.git +$ cd nostr-java +$ git checkout +```
unit-tested build (does not require a nostr-relay for testing) @@ -54,7 +47,7 @@ To use it in your project, add the following to your pom.xml file. (windows) $ ./mvnw.cmd clean test $ ./mvnw.cmd install -Dmaven.test.skip=true - + ###### gradle @@ -89,6 +82,19 @@ valid relay(s) must **_first_** be defined in [relays.properties](nostr-java-api $ ./gradlew.bat publishToMavenLocal
+3. add dependency to your pom.xml + +```xml + + + nostr-java + nostr-java-api + ${nostr-java.version} + + +``` + + ## Examples I recommend having a look at these repositories/module for examples: From 9ca0268a9aea89cb600431589f70be32c283a166 Mon Sep 17 00:00:00 2001 From: nick avlo Date: Wed, 30 Apr 2025 12:52:17 -0700 Subject: [PATCH 3/3] README updates to build project from source --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d907b136e..57159cb82 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ Nostr-java is a library for generating, signing, and publishing nostr events to - Java 21+ ## Usage -To use nostr-java in your project, two options: +### To use nostr-java in your project, two options: -Option 1 - add release version and jitpack.io repository to your pom.xml file +#### Option 1 - add release version and jitpack.io repository to your pom.xml file ```xml @@ -27,7 +27,7 @@ Option 1 - add release version and jitpack.io repository to your pom.xml file ``` -Option 2 - Check out and build project directly from source +#### Option 2 - Check out and build project directly from source ```bash $ cd @@ -41,23 +41,23 @@ $ git checkout ###### maven (unix) - $ ./mvnw clean test - $ ./mvnw install -Dmaven.test.skip=true + $ ./mvnw clean test + $ ./mvnw install -Dmaven.test.skip=true (windows) - $ ./mvnw.cmd clean test - $ ./mvnw.cmd install -Dmaven.test.skip=true + $ ./mvnw.cmd clean test + $ ./mvnw.cmd install -Dmaven.test.skip=true ###### gradle (unix) - $ ./gradlew clean test - $ ./gradlew publishToMavenLocal + $ ./gradlew clean test + $ ./gradlew publishToMavenLocal (windows) - $ ./gradlew.bat clean test - $ ./gradlew.bat publishToMavenLocal + $ ./gradlew.bat clean test + $ ./gradlew.bat publishToMavenLocal
@@ -67,22 +67,22 @@ valid relay(s) must **_first_** be defined in [relays.properties](nostr-java-api ###### maven (unix) - $ ./mvnw clean install + $ ./mvnw clean install (windows) - $ ./mvnw.cmd clean install + $ ./mvnw.cmd clean install ###### gradle (unix) - $ ./gradlew clean check - $ ./gradlew publishToMavenLocal + $ ./gradlew clean check + $ ./gradlew publishToMavenLocal (windows) - $ ./gradlew.bat clean check - $ ./gradlew.bat publishToMavenLocal + $ ./gradlew.bat clean check + $ ./gradlew.bat publishToMavenLocal
-3. add dependency to your pom.xml +#### add dependency to your pom.xml ```xml