Skip to content

Commit 8699854

Browse files
authored
Update to web3j v4.3.0 and other improvements (#26)
* Revert adding web3j dependency to user project and upgrade versions * Update Gradle wrapper and Solidity plugin version * Fix version and remove Maven local repo * Update Gradle wrapper version in readme file
1 parent 65172c4 commit 8699854

File tree

6 files changed

+10
-15
lines changed

6 files changed

+10
-15
lines changed

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Before you start, you will need to install the
1111
[Solidity compiler](https://solidity.readthedocs.io/en/latest/installing-solidity.html)
1212
if is not already installed in your computer.
1313

14-
In addition, the minimum Gradle version to run the plugin is `4.9` and the recommended `5.2.x`.
14+
In addition, the minimum Gradle version to run the plugin is `4.9` and the recommended `5.4.x`.
1515

1616
### Using the `buildscript` convention
1717

@@ -25,7 +25,7 @@ buildscript {
2525
mavenCentral()
2626
}
2727
dependencies {
28-
classpath 'org.web3j:web3j-gradle-plugin:4.1.3'
28+
classpath 'org.web3j:web3j-gradle-plugin:4.3.0'
2929
}
3030
}
3131
@@ -39,7 +39,7 @@ build file:
3939

4040
```groovy
4141
plugins {
42-
id 'org.web3j' version '4.1.3'
42+
id 'org.web3j' version '4.3.0'
4343
}
4444
```
4545

Diff for: build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jacocoTestReport {
2828
}
2929

3030
ext {
31-
web3jVersion = '4.1.1'
32-
solidityPluginVersion = '0.1.4'
31+
web3jVersion = '4.3.0'
32+
solidityPluginVersion = '0.1.6'
3333
junitVersion = '4.12'
3434

3535
ossrhUsername = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : System.getenv('OSSRH_USERNAME')

Diff for: gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
group=org.web3j
2-
version=4.1.3
2+
version=4.3.0

Diff for: gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

Diff for: src/main/java/org/web3j/gradle/plugin/Web3jPlugin.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public void apply(final Project target) {
3333
target.getPluginManager().apply(JavaPlugin.class);
3434
target.getPluginManager().apply(SolidityPlugin.class);
3535
target.getExtensions().create(Web3jExtension.NAME, Web3jExtension.class, target);
36+
target.getDependencies().add("implementation", "org.web3j:core:4.3.0");
3637

3738
final SourceSetContainer sourceSets = target.getConvention()
3839
.getPlugin(JavaPluginConvention.class).getSourceSets();
@@ -68,8 +69,8 @@ private void configure(final Project project, final SourceSet sourceSet) {
6869

6970
// Set the sources for the generation task
7071
task.setSource(buildSourceDirectorySet(sourceSet));
71-
task.setDescription("Generates web3j contract wrappers for "
72-
+ sourceSet.getName() + " source set.");
72+
task.setDescription("Generates " + sourceSet.getName()
73+
+ " Java contract wrappers from Solidity ABIs.");
7374

7475
// Set the task output directory
7576
task.getOutputs().dir(outputDir);

Diff for: src/test/java/org/web3j/gradle/plugin/Web3jPluginTest.java

-6
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ public void generateContractWrappersExcluding() throws IOException {
5757
"}\n" +
5858
"repositories {\n" +
5959
" mavenCentral()\n" +
60-
"}\n" +
61-
"dependencies {\n" +
62-
" implementation \"org.web3j:core:4.1.1\"\n" +
6360
"}\n";
6461

6562
Files.write(buildFile.toPath(), buildFileContent.getBytes());
@@ -112,9 +109,6 @@ public void generateContractWrappersIncluding() throws IOException {
112109
"}\n" +
113110
"repositories {\n" +
114111
" mavenCentral()\n" +
115-
"}\n" +
116-
"dependencies {\n" +
117-
" implementation \"org.web3j:core:4.1.1\"\n" +
118112
"}\n";
119113

120114
Files.write(buildFile.toPath(), buildFileContent.getBytes());

0 commit comments

Comments
 (0)