From f7b5d077291963899228ac74e240c573f6ac4269 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Tue, 10 Dec 2024 15:37:40 +0800 Subject: [PATCH 1/4] Fix publish maven, fix javadocs Signed-off-by: Eval EXEC --- ckb/src/main/java/org/nervos/ckb/CkbRpcApi.java | 2 +- .../ckb/transaction/AbstractTransactionBuilder.java | 4 ++++ .../nervos/ckb/transaction/CkbTransactionBuilder.java | 10 ++++++++++ .../nervos/ckb/transaction/handler/ScriptHandler.java | 4 ++-- .../main/java/org/nervos/ckb/sign/ScriptSigner.java | 6 +++--- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ckb/src/main/java/org/nervos/ckb/CkbRpcApi.java b/ckb/src/main/java/org/nervos/ckb/CkbRpcApi.java index 11965349..d1f618ae 100644 --- a/ckb/src/main/java/org/nervos/ckb/CkbRpcApi.java +++ b/ckb/src/main/java/org/nervos/ckb/CkbRpcApi.java @@ -35,7 +35,7 @@ default TransactionWithStatus getTransaction(@Nonnull byte[] transactionHash) th * * @param transactionHash the transaction hash * @return the RPC does not return the transaction content and the field transaction must be null. - * @throws IOException + * @throws IOException RPC Errors */ default TransactionWithStatus getTransactionStatus(@Nonnull byte[] transactionHash) throws IOException { return getTransactionStatus(transactionHash, null); diff --git a/ckb/src/main/java/org/nervos/ckb/transaction/AbstractTransactionBuilder.java b/ckb/src/main/java/org/nervos/ckb/transaction/AbstractTransactionBuilder.java index 8e10c886..4792249c 100644 --- a/ckb/src/main/java/org/nervos/ckb/transaction/AbstractTransactionBuilder.java +++ b/ckb/src/main/java/org/nervos/ckb/transaction/AbstractTransactionBuilder.java @@ -18,6 +18,7 @@ public abstract class AbstractTransactionBuilder { * * @param configuration This is the bundle of configuration for builder, * such as fee rate and registerred {@link org.nervos.ckb.transaction.handler.ScriptHandler}. + * @param availableInputs This is the iterator of available inputs for the transaction. */ public AbstractTransactionBuilder(TransactionBuilderConfiguration configuration, Iterator availableInputs) { this.configuration = configuration; @@ -101,6 +102,7 @@ protected static long calculateTxFee(Transaction transaction, long feeRate) { * default context null. Use {@link #build(Object...)} to pass custom contexts. * * @see org.nervos.ckb.transaction.handler.ScriptHandler#buildTransaction(AbstractTransactionBuilder, ScriptGroup, Object) + * @return none */ public TransactionWithScriptGroups build() { return build((Object) null); @@ -149,6 +151,8 @@ public Map rebuildScriptGroups(Map scr * The contexts will be passed to the registered script handlers in the same order. * * @see org.nervos.ckb.transaction.handler.ScriptHandler#buildTransaction(AbstractTransactionBuilder, ScriptGroup, Object) + * @param contexts objects + * @return none */ abstract TransactionWithScriptGroups build(Object... contexts); } diff --git a/ckb/src/main/java/org/nervos/ckb/transaction/CkbTransactionBuilder.java b/ckb/src/main/java/org/nervos/ckb/transaction/CkbTransactionBuilder.java index 431c440a..cb0e6725 100644 --- a/ckb/src/main/java/org/nervos/ckb/transaction/CkbTransactionBuilder.java +++ b/ckb/src/main/java/org/nervos/ckb/transaction/CkbTransactionBuilder.java @@ -28,6 +28,8 @@ public CkbTransactionBuilder(TransactionBuilderConfiguration configuration, Iter * Add a potential input for the transaction. *

* The input may not be actually used if there's already enough capacity for the outputs. + * @param transactionInput the transactionInput + * @return none */ public CkbTransactionBuilder addInput(TransactionInput transactionInput) { transactionInputs.add(transactionInput); @@ -45,6 +47,9 @@ public CkbTransactionBuilder addHeaderDep(String headerDep) { /** * Add outputs and data. The two parameters should have the same size. + * @param outputs the outputs + * @param outputsData the outputsData + * @return none */ public CkbTransactionBuilder setOutputs(List outputs, List outputsData) { tx.outputs.addAll(outputs); @@ -75,6 +80,9 @@ public CkbTransactionBuilder addDaoDepositOutput(String address, long capacity) * Set possible change output. Its capacity must be 0. *

* Change output should be set only once. + * @param output the change output + * @param data the data + * @return none */ public CkbTransactionBuilder setChangeOutput(@Nonnull CellOutput output, @Nonnull byte[] data) { if (changeOutput != null) { @@ -92,6 +100,8 @@ public CkbTransactionBuilder setChangeOutput(@Nonnull CellOutput output, @Nonnul * Set possible change output address. *

* Change output should be set only once. + * @param address the address of change output + * @return none */ public CkbTransactionBuilder setChangeOutput(@Nonnull String address) { CellOutput output = new CellOutput(0, Address.decode(address).getScript()); diff --git a/ckb/src/main/java/org/nervos/ckb/transaction/handler/ScriptHandler.java b/ckb/src/main/java/org/nervos/ckb/transaction/handler/ScriptHandler.java index f1035a81..780b9dbe 100644 --- a/ckb/src/main/java/org/nervos/ckb/transaction/handler/ScriptHandler.java +++ b/ckb/src/main/java/org/nervos/ckb/transaction/handler/ScriptHandler.java @@ -29,8 +29,8 @@ public interface ScriptHandler { * *

For example:

* - *
{@code
-   * @Override
+   * 
+   * {@code
    * boolean buildTransaction(AbstractTransactionBuilder txBuilder, ScriptGroup scriptGroup, Object context) {
    *    // Only change the transaction when the script is used.
    *    if (scriptGroup == null || !isMatched(scriptGroup.getScript())) {
diff --git a/core/src/main/java/org/nervos/ckb/sign/ScriptSigner.java b/core/src/main/java/org/nervos/ckb/sign/ScriptSigner.java
index c114b45b..c1f07925 100644
--- a/core/src/main/java/org/nervos/ckb/sign/ScriptSigner.java
+++ b/core/src/main/java/org/nervos/ckb/sign/ScriptSigner.java
@@ -20,9 +20,9 @@ public interface ScriptSigner {
    * @param context This is passed from {@code TransactionSigner.signTransaction}
    * @return {@code true} when the script handler has modified the transaction.
    *
-   * @see TransactionSigner#signTransaction(TransactionWithScriptGroups, Context...)
-   * @see TransactionSigner#signTransaction(TransactionWithScriptGroups, Set)
-   * @see TransactionSigner#signTransaction(TransactionWithScriptGroups, String...)
+   * @see "TransactionSigner#signTransaction(TransactionWithScriptGroups, Context...)"
+   * @see "TransactionSigner#signTransaction(TransactionWithScriptGroups, Set)"
+   * @see "TransactionSigner#signTransaction(TransactionWithScriptGroups, String...)"
    */
   boolean signTransaction(Transaction transaction, ScriptGroup scriptGroup, Context context);
 }

From b2b5e651a659ca66381076f944c2161ae942d643 Mon Sep 17 00:00:00 2001
From: Eval EXEC 
Date: Tue, 10 Dec 2024 15:51:25 +0800
Subject: [PATCH 2/4] Fix gradle project description

---
 build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.gradle b/build.gradle
index 074c4d02..6d6dcb5d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -34,7 +34,7 @@ apply plugin: 'io.codearte.nexus-staging'
 mainClassName = 'org.nervos.ckb.example.RpcExample'
 applicationName = 'ckb-sdk-java'
 
-description 'ckb-sdk-java base project'
+description = 'ckb-sdk-java base project'
 
 allprojects {
 

From 07aa05402321d4d1f5fadac643525e8f50f1f3d2 Mon Sep 17 00:00:00 2001
From: Eval EXEC 
Date: Tue, 10 Dec 2024 15:59:36 +0800
Subject: [PATCH 3/4] Upgrade to 3.0.1

---
 CHANGELOG.md | 3 +++
 build.gradle | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index c46b834b..f37590be 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+# 3.0.1 (2024-12-10)
+- fix: fix javaDocs error
+
 # 3.0.0 (2024-11-26)
 - feat: support indexer filter script_len_range
 - feat: support v0.119.0 rpcs #683
diff --git a/build.gradle b/build.gradle
index 6d6dcb5d..c4d12b39 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,7 +42,7 @@ allprojects {
     targetCompatibility = 1.8
 
     group 'org.nervos.ckb'
-    version '3.0.0'
+    version '3.0.1'
     apply plugin: 'java'
 
     repositories {
@@ -105,7 +105,7 @@ configure(subprojects.findAll { it.name != 'tests' }) {
         publications {
             mavenJava(MavenPublication) {
                 groupId 'org.nervos.ckb'
-                version '3.0.0'
+                version '3.0.1'
                 from components.java
 
                 pom {

From d2e561b4a18028cb2898412dc633ece8dccb6d9d Mon Sep 17 00:00:00 2001
From: Eval EXEC 
Date: Tue, 10 Dec 2024 16:00:49 +0800
Subject: [PATCH 4/4] test publish

Signed-off-by: Eval EXEC 
---
 .github/workflows/cd.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index 6d8af6c6..38b5bdab 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -2,8 +2,8 @@ name: Continuous delivery in GitHub and Maven Central Repository
 
 on:
   push:
-    tags:
-      - 'rc/v*'
+    branch:
+      - 'eval-exec/exec/fix-publish'
 
 jobs:
   create_release_draft: