Skip to content

Commit f4aba87

Browse files
committed
merge develop-0.15.1 to master
2 parents 4665580 + 66439a0 commit f4aba87

673 files changed

Lines changed: 6211 additions & 8562 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*.iws
1111
.idea/
1212
.gradle/
13-
*.txt
13+
# *.txt
1414
*.log
1515

1616
# Geany project file

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
git clone https://github.com/PlatONnetwork/client-sdk-java.git
77
cd client-sdk-java/
88
./gradlew clean jar //Generate jar package
9-
./gradlew clean distZip //Generate code generation skeleton tool
9+
./gradlew clean distZip //Generate code generation skeleton tool
1010
./gradlew -Pintegration-tests=true :integration-tests:test //To run the integration tests:
1111
1212
```
@@ -20,14 +20,14 @@
2020
<dependency>
2121
<groupId>com.platon.sdk</groupId>
2222
<artifactId>core</artifactId>
23-
<version>0.15.1.12</version>
23+
<version>0.15.1.14</version>
2424
</dependency>
2525
```
2626

2727
or
2828

2929
```
30-
compile "com.platon.sdk:core:0.15.1.12"
30+
compile "com.platon.sdk:core:0.15.1.14"
3131
```
3232

3333
* use in project
@@ -37,6 +37,8 @@ compile "com.platon.sdk:core:0.15.1.12"
3737
NetworkParameters.init(2000L, "ABC");
3838
```
3939

40+
chain ID 201018 is reserved for Alaya, and chain ID 100 is reserved for PlatON.
41+
4042
2. user can switch current network if multi-networks have been initialized.
4143
```java
4244
NetworkParameters.selectNetwork(2000L, "ABC");

abi/build.gradle

Lines changed: 0 additions & 7 deletions
This file was deleted.

abi/src/main/java/org/web3j/abi/WasmReturnDecoder.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

build.gradle

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ subprojects {
102102
tasks.withType(JavaCompile) {
103103
options.encoding = "UTF-8"
104104
}
105+
tasks.withType(Javadoc).all { enabled = false }
105106
//sonar扫描的路径
106107
sonarqube {
107108
properties {
@@ -139,8 +140,22 @@ configure(subprojects.findAll { it.name != 'integration-tests' }) {
139140
}
140141

141142
ext {
142-
ossrhUsername = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : System.getenv("ossrhUsername")
143-
ossrhPassword = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : System.getenv("ossrhPassword")
143+
ossrhUsername = ""
144+
ossrhPassword = ""
145+
//read maven repositories username and password from a file which is ignored by Git.
146+
//./.gradle/publish.properties sample:
147+
//ossrhUsername=user
148+
//ossrhPassword=pwd
149+
def publishPropsFile = rootProject.file("./.gradle/publish.properties")
150+
Properties publishProps = new Properties()
151+
if (publishPropsFile.exists()) {
152+
publishProps.load(new FileInputStream(publishPropsFile))
153+
ossrhUsername = publishProps['ossrhUsername']
154+
ossrhPassword = publishProps['ossrhPassword']
155+
} else{
156+
ossrhUsername = System.getenv("ossrhUsername")
157+
ossrhPassword = System.getenv("ossrhPassword")
158+
}
144159
isSnapshotVersion = project.version.endsWith("-SNAPSHOT")
145160
}
146161

@@ -278,9 +293,8 @@ task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
278293
classDirectories = files(classDirectories.files.collect {
279294
fileTree(dir: it,
280295
exclude: [
281-
'org/web3j/abi/datatypes/generated/**',
282-
'org/web3j/tuples/generated/**',
283-
'org/web3j/ens/contracts/generated/**'
296+
'com/platon/abi/solidity/datatypes/generated/**',
297+
'com/platon/tuples/generated/**'
284298
])
285299
})
286300
}

codegen/src/main/java/org/web3j/codegen/AbiTypesGenerator.java renamed to codegen/src/main/java/com/platon/codegen/AbiTypesGenerator.java

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
1-
package org.web3j.codegen;
1+
package com.platon.codegen;
22

3+
import com.platon.abi.solidity.datatypes.*;
4+
import com.squareup.javapoet.*;
5+
6+
import javax.lang.model.element.Modifier;
37
import java.io.IOException;
48
import java.math.BigInteger;
59
import java.util.Arrays;
610
import java.util.List;
7-
import javax.lang.model.element.Modifier;
8-
9-
import com.squareup.javapoet.ArrayTypeName;
10-
import com.squareup.javapoet.ClassName;
11-
import com.squareup.javapoet.FieldSpec;
12-
import com.squareup.javapoet.MethodSpec;
13-
import com.squareup.javapoet.ParameterizedTypeName;
14-
import com.squareup.javapoet.TypeSpec;
15-
import com.squareup.javapoet.TypeVariableName;
16-
17-
import org.web3j.abi.datatypes.Bytes;
18-
import org.web3j.abi.datatypes.Fixed;
19-
import org.web3j.abi.datatypes.Int;
20-
import org.web3j.abi.datatypes.StaticArray;
21-
import org.web3j.abi.datatypes.Type;
22-
import org.web3j.abi.datatypes.Ufixed;
23-
import org.web3j.abi.datatypes.Uint;
2411

2512
/**
2613
* Generator class for creating all the different numeric type variants.

codegen/src/main/java/org/web3j/codegen/AbiTypesMapperGenerator.java renamed to codegen/src/main/java/com/platon/codegen/AbiTypesMapperGenerator.java

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
1-
package org.web3j.codegen;
1+
package com.platon.codegen;
22

3-
import java.io.IOException;
4-
import javax.lang.model.element.Modifier;
3+
import com.platon.abi.solidity.datatypes.*;
4+
import com.squareup.javapoet.*;
55

6-
import com.squareup.javapoet.ClassName;
7-
import com.squareup.javapoet.MethodSpec;
8-
import com.squareup.javapoet.ParameterizedTypeName;
9-
import com.squareup.javapoet.TypeSpec;
10-
import com.squareup.javapoet.WildcardTypeName;
11-
12-
import org.web3j.abi.datatypes.Address;
13-
import org.web3j.abi.datatypes.Bool;
14-
import org.web3j.abi.datatypes.Bytes;
15-
import org.web3j.abi.datatypes.DynamicBytes;
16-
import org.web3j.abi.datatypes.Fixed;
17-
import org.web3j.abi.datatypes.Int;
18-
import org.web3j.abi.datatypes.Type;
19-
import org.web3j.abi.datatypes.Ufixed;
20-
import org.web3j.abi.datatypes.Uint;
21-
import org.web3j.abi.datatypes.Utf8String;
6+
import javax.lang.model.element.Modifier;
7+
import java.io.IOException;
228

239
/**
2410
* Generator class for creating all the different numeric type variants.

codegen/src/main/java/org/web3j/codegen/Console.java renamed to codegen/src/main/java/com/platon/codegen/Console.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.web3j.codegen;
1+
package com.platon.codegen;
22

33
/**
44
* Command line utility classes.

codegen/src/main/java/org/web3j/codegen/FunctionWrapperGenerator.java renamed to codegen/src/main/java/com/platon/codegen/FunctionWrapperGenerator.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
package org.web3j.codegen;
1+
package com.platon.codegen;
22

33
import java.io.File;
44

5-
import static org.web3j.codegen.Console.exitError;
6-
75
/**
86
* Abstract base class for the concrete function wrapper generators.
97
*/
@@ -33,7 +31,7 @@ static boolean useJavaNativeTypes(String argVal, String usageString) {
3331
} else if (JAVA_TYPES_ARG.equals(argVal)) {
3432
useJavaNativeTypes = true;
3533
} else {
36-
exitError(usageString);
34+
Console.exitError(usageString);
3735
}
3836
return useJavaNativeTypes;
3937
}

codegen/src/main/java/org/web3j/codegen/GenerationReporter.java renamed to codegen/src/main/java/com/platon/codegen/GenerationReporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.web3j.codegen;
1+
package com.platon.codegen;
22

33
/**
44
* Can be used to provide report about a code generation process.

0 commit comments

Comments
 (0)