Skip to content

Web3j fix android #2122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 114 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
a6c727e
minSDKversion updated
shashankiitbhu Sep 19, 2024
660a66e
change default branch to main
NickSneo Apr 5, 2024
11e7c7e
update secrets
gtebrean Apr 11, 2024
f0d0c9e
update changelog
gtebrean Apr 11, 2024
657d148
update build
gtebrean Apr 11, 2024
131ffdf
fix yaml
gtebrean Apr 11, 2024
0b44508
update signature
gtebrean Apr 11, 2024
f2678b9
update changelog
gtebrean Apr 11, 2024
c4103ab
revert changes
gtebrean Apr 11, 2024
34d369d
update changelog
gtebrean Apr 11, 2024
561a712
update secrets
gtebrean Apr 11, 2024
98cd600
main branch configs
NickSneo Apr 11, 2024
8da85dd
changelog entry
NickSneo Apr 11, 2024
86b6d61
web3j release fix
NickSneo Apr 12, 2024
48453f0
web3j release fix
NickSneo Apr 12, 2024
9cc22f3
add contributtor call
gtebrean Apr 17, 2024
ce21072
update links
gtebrean Apr 17, 2024
ec394e0
update contributing
gtebrean Apr 18, 2024
5b56061
Fix typos in class FullDebugTraceInfo
hanmz Apr 23, 2024
98e128e
Fix typos in class FullDebugTraceInfo
hanmz Apr 24, 2024
53e67e4
[bug] Fix two typos in package org.web3j.abi
hanmz Apr 23, 2024
bbc5c89
update signature
gtebrean Apr 11, 2024
cb9404f
update changelog
gtebrean Apr 11, 2024
b07aac7
revert changes
gtebrean Apr 11, 2024
e86b10a
update secrets
gtebrean Apr 11, 2024
224767e
encodePacked DynamicBytes
xutruth Apr 18, 2024
2cb6b1f
add changelog for fix encodePacked DynamicBytes
xutruth Apr 22, 2024
5ab3540
modify encodePacked Utf8String
xutruth Apr 23, 2024
e099d52
Repo owner change (#2048)
NickSneo Apr 30, 2024
d477550
bump version 4.11.4 (#2049)
NickSneo May 1, 2024
8575237
Upgrade gradle to v8.5
bradbown May 7, 2024
8c026bf
Upgrade gradle to 8.7
NickSneo May 20, 2024
6747968
added back integration test dependency
NickSneo May 20, 2024
6822796
jacoco fix, snapshot version to 4.12.0
NickSneo May 20, 2024
6e04ff0
Fixed DefaultFunctionEncoder calculating offset for nested StaticArra…
penuel-leo May 23, 2024
65bcfec
Bump snapshot to 4.12.1 (#2058)
NickSneo May 24, 2024
1c5df03
update maintainers.md
gtebrean Jun 10, 2024
e7d1e83
update
gtebrean Jun 10, 2024
8447077
update
gtebrean Jun 11, 2024
1d70c46
add missing LFID
gtebrean Jun 11, 2024
46df8bc
Bug fix: Same inner struct name of different libraries result in fail…
tonykwok1992 Jun 14, 2024
9efb07b
Bug fix for detecting struct only being used as array of struct (#2061)
tonykwok1992 Jun 14, 2024
f688679
chore: fix some comments (#2067)
cangqiaoyuzhuo Jun 14, 2024
aeb1473
Remove registration of bouncy castle as JCE provider (#2066)
killergerbah Jun 26, 2024
8338c77
Bug fix for Int256 decode range [2^248, type(int256).max] and [ type(…
tonykwok1992 Jun 26, 2024
7cbd37b
Big fix for codegen when Array of struct and struct used together
tonykwok1992 Jun 14, 2024
055902d
separate array type handling
tonykwok1992 Jun 16, 2024
c155231
Fix normalizedType
tonykwok1992 Jun 17, 2024
74d286e
Add test for fixing more issue
tonykwok1992 Jun 17, 2024
d6d1229
Document the minimum required Java version for the target project to …
kaygorodov Jun 27, 2024
f0d26cd
Make getABI_* calls static (#2079)
tonykwok1992 Jul 22, 2024
46d0755
fix for new URL (web3j to hyperledger) including one branch fix (mast…
Julius278 Jul 30, 2024
d93aa03
Updated TypeReference object to support nested types to support truly…
Mar 26, 2024
264c03c
Support decoding of DynamicArray of DynamicStruct (with corresponding…
Antlion12 Jul 10, 2024
44a7da2
Return extraneous 'else { return ... }' from decodeDynamicStruct().
Antlion12 Jul 16, 2024
238a058
Run spotless.
Antlion12 Jul 16, 2024
87f97dc
Factor out offset-computation and parameter-extraction from decodeDyn…
Antlion12 Jul 16, 2024
8267cff
move test
gtebrean Aug 1, 2024
f37e7aa
spotless
gtebrean Aug 1, 2024
1b8ee47
fix naming
gtebrean Aug 4, 2024
a39fb25
add DynamicStructOfStaticStruct
gtebrean Aug 4, 2024
d229a9a
Support building StaticStruct using innerTypes. Add testBuildDynamicA…
Antlion12 Aug 5, 2024
a8257ce
Rename numNestedFields() to countNestedFields().
Antlion12 Aug 8, 2024
7e7a7b2
Run spotless.
Antlion12 Aug 8, 2024
8843a0e
Update CHANGELOG.md.
Antlion12 Aug 8, 2024
7112a9c
add fix
gtebrean Aug 8, 2024
a1f1bea
update changelog
gtebrean Aug 8, 2024
f14e038
Bug fix for FastRawTransactionManager.resetNonce (#2084)
junsung-cho Aug 10, 2024
3b1e426
Release 4.12.1
gtebrean Aug 13, 2024
510d2db
Release 4.12.1
gtebrean Aug 13, 2024
d6b45c3
fix licence
gtebrean Aug 14, 2024
4d1e213
update changelog
gtebrean Aug 14, 2024
00759b6
fix licence
gtebrean Aug 14, 2024
2797793
bump version
gtebrean Aug 15, 2024
0938a16
bump version
gtebrean Aug 15, 2024
c3efcde
added Linea ENS Support
NickSneo Aug 19, 2024
a45ce45
added Linea Sepolia support too
NickSneo Aug 19, 2024
c2c540c
added test and changelog
NickSneo Aug 19, 2024
df8699d
Upgrade jc-kzg-4844 to 2.0.0
StefanBratanov Aug 29, 2024
43f1c83
fix spotless
StefanBratanov Aug 29, 2024
43f4189
Bump snapshot version to 4.12.3 (#2101)
NickSneo Sep 19, 2024
a067110
updated dependencies
shashankiitbhu Sep 23, 2024
1d73c50
Web3j implements AutoClosable Interface (#2102)
steffenboe Sep 25, 2024
fa14aa1
add kms implementation
gtebrean Oct 1, 2024
e18679d
update changelog
gtebrean Oct 2, 2024
85f3ae8
migrating to android
shashankiitbhu Oct 9, 2024
6993b7a
fixing build issues
shashankiitbhu Oct 14, 2024
943e093
Rename .java to .kt
shashankiitbhu Oct 22, 2024
8c5d8f4
fixing build issues
shashankiitbhu Oct 22, 2024
cc63051
fixing build issues in codegen
shashankiitbhu Oct 24, 2024
2351af7
fix codegen build issues
shashankiitbhu Oct 25, 2024
c420a1a
fix codegen build issues
shashankiitbhu Oct 26, 2024
c1bd261
fix codegen build issues
shashankiitbhu Oct 29, 2024
7d8748c
fix codegen build issues
shashankiitbhu Nov 25, 2024
b28c51b
Rename .java to .kt
shashankiitbhu Nov 25, 2024
314de43
codegen module test fix
shashankiitbhu Nov 25, 2024
56517b8
crypto module test fix
shashankiitbhu Nov 26, 2024
f5a0b8b
Integration Test Fix
shashankiitbhu Nov 27, 2024
c56f29c
Integration Test Fix
shashankiitbhu Dec 2, 2024
5d442a4
Integration Test Fix
shashankiitbhu Dec 3, 2024
2c9104d
Merge remote-tracking branch 'upstream/web3j-android' into web3j-fix-…
shashankiitbhu Dec 3, 2024
af4c671
Typedecoder android fix
shashankiitbhu Dec 5, 2024
3d5c51e
pom configuaration added
shashankiitbhu Dec 6, 2024
7202562
Build Fixes
shashankiitbhu Dec 6, 2024
c4865a9
build fix
shashankiitbhu Dec 6, 2024
4fb1a26
Add lint-baseline.xml to gitignore
shashankiitbhu Dec 10, 2024
fdb2e62
remove crypto test comments
shashankiitbhu Dec 10, 2024
f299234
gradle publish signing fix
shashankiitbhu Dec 10, 2024
a79f25a
gradle published comments removed
shashankiitbhu Dec 10, 2024
9bf62de
build workflow modified
shashankiitbhu Dec 11, 2024
cee6462
workflows added
shashankiitbhu Dec 11, 2024
b7cbf7f
codegen fixed
shashankiitbhu Dec 11, 2024
7258070
Integration test build fix
shashankiitbhu Dec 11, 2024
9ce2517
Integration-tests fix
shashankiitbhu Dec 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches:
- main
- web3j-android
workflow_dispatch:

jobs:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
branches: [ 'main' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'main' ]
branches:
- main
- web3j-android
schedule:
- cron: '35 2 * * 3'

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Publish snapshot
on:
workflow_run:
workflows: [ 'Build' ]
branches: [ main ]
branches:
- main
- web3j-android
types: [ completed ]

jobs:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ docs/build
**/bin

# Besu-dev-quickstart logs
integration-tests/src/test/resources/quorum-test-network/logs
integration-tests/src/test/resources/quorum-test-network/logs

**/lint-baseline.xml
4 changes: 4 additions & 0 deletions .kotlin/errors/errors-1732031657319.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kotlin version: 2.0.21
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
1. Kotlin compile daemon is ready

4 changes: 4 additions & 0 deletions .kotlin/errors/errors-1733489503716.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kotlin version: 2.0.21
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
1. Kotlin compile daemon is ready

30 changes: 28 additions & 2 deletions abi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
plugins {
id 'com.android.library'
id 'maven-publish'
}

publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = project.name
version = version

artifact("$buildDir/outputs/aar/${project.name}-release.aar")

pom {
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.api.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
}
}
}
}
}
repositories {
mavenLocal()
}
}

android {
Expand All @@ -9,8 +37,6 @@ android {
defaultConfig {
minSdkVersion 24
targetSdkVersion 33


}

lint {
Expand Down
4 changes: 2 additions & 2 deletions abi/src/main/java/org/web3j/abi/TypeDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ public static <T extends NumericType> T decodeNumeric(String input, Class<T> typ

BigInteger numericValue;
if (Uint.class.isAssignableFrom(type) || Ufixed.class.isAssignableFrom(type)) {
numericValue = new BigInteger(1, inputByteArray, valueOffset, typeLengthAsBytes);
numericValue = new BigInteger(1, Arrays.copyOfRange(inputByteArray, valueOffset, valueOffset + typeLengthAsBytes));
} else {
numericValue = new BigInteger(inputByteArray, valueOffset, typeLengthAsBytes);
numericValue = new BigInteger(Arrays.copyOfRange(inputByteArray, valueOffset, valueOffset + typeLengthAsBytes));
}
return type.getConstructor(BigInteger.class).newInstance(numericValue);

Expand Down
33 changes: 33 additions & 0 deletions android-test-utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
plugins {
id 'com.android.library'
id 'maven-publish'
}

publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = project.name
version = version

artifact("$buildDir/outputs/aar/${project.name}-release.aar")

pom {
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.api.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
}
}
}
}
}
repositories {
mavenLocal()
}
}

android {
Expand All @@ -19,6 +47,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

lint {
baseline = file("lint-baseline.xml")
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down
28 changes: 28 additions & 0 deletions besu/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
plugins {
id 'com.android.library'
id 'maven-publish'
}

publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = project.name
version = version

artifact("$buildDir/outputs/aar/${project.name}-release.aar")

pom {
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.api.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
}
}
}
}
}
repositories {
mavenLocal()
}
}

android {
Expand Down
54 changes: 14 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'java'
id 'idea'
id 'com.android.library' version '8.5.1' apply false
id 'org.sonarqube' version '5.0.0.4638'
id 'jacoco'
id 'com.diffplug.spotless' version '6.25.0'
id 'io.codearte.nexus-staging' version '0.30.0'
id 'de.marcphilipp.nexus-publish' version '0.4.0'
id 'de.undercouch.download' version '4.1.2'
id 'org.ajoberstar.git-publish' version '3.0.1'
id 'com.android.application' version '8.5.1' apply false
id 'org.jetbrains.kotlin.android' version '2.0.21' apply false
id 'maven-publish'
}



ext {
bouncycastleVersion = '1.78.1'
jacksonVersion = '2.17.1'
javaPoetVersion = '1.13.0'
kotlinVersion = '1.9.24'
kotlinPoetVersion = '1.16.0'
kotlinVersion = '2.0.0'
kotlinPoetVersion = '2.0.0'
jnr_unixsocketVersion = '0.38.22'
okhttpVersion = '4.12.0'
rxjavaVersion = '2.2.21'
Expand All @@ -26,7 +27,6 @@ ext {
picocliVersion = '4.7.6'
ensAdraffyVersion = '0.2.0'
kzg4844Version = '2.0.0'
awsSdkVersion = '2.27.24'
tuweniVersion = '2.4.2'
// test dependencies
equalsverifierVersion = '3.16.1'
Expand All @@ -38,46 +38,27 @@ ext {
junitPlatformLauncherVersion = '1.5.2'
}


description 'Web3j base project.'

[
'jacoco',
'java',
'javadoc',
'publish',
'repositories',
'spotless'
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/$buildScript/build.gradle"
dest "$rootDir/gradle/$buildScript/build.gradle"
overwrite false
quiet true
onlyIfModified true
}
}

allprojects {
apply {
[
'java',
'javadoc',
'repositories',
'spotless'
'repositories'
].each { buildScript ->
from("$rootDir/gradle/$buildScript/build.gradle")
}
}

repositories {
google()
mavenCentral()
}

tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
useJUnitPlatform()
}


dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoJunitVersion"

configurations.all {
resolutionStrategy {
Expand All @@ -98,10 +79,3 @@ allprojects {
apply from: "$rootDir/gradle/publish/build.gradle"
}
}
configure(subprojects.findAll { it.name != 'integration-tests' }) {
apply from: "$rootDir/gradle/jacoco/build.gradle"
}


tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") }
tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") }
39 changes: 36 additions & 3 deletions codegen/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'maven-publish'
}

publishing {
publications {
release(MavenPublication) {
groupId = group
artifactId = project.name
version = version

artifact("$buildDir/outputs/aar/${project.name}-release.aar")

pom {
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.api.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
}
}
}
}
}
repositories {
mavenLocal()
}
}

android {
namespace 'com.org.web3j'
compileSdkVersion 34

defaultConfig {
minSdkVersion 24
minSdkVersion 26
targetSdkVersion 34

}
Expand All @@ -29,9 +57,10 @@ android {
test {
java.srcDirs = ['src/test/java']
}

}
kotlinOptions {
jvmTarget = '17'
jvmTarget = "17"
}
}

Expand All @@ -49,11 +78,15 @@ dependencies {
//testImplementation project(':core').sourceSets.test.output
testImplementation "ch.qos.logback:logback-core:$logbackVersion"
testImplementation "ch.qos.logback:logback-classic:$logbackVersion"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
testImplementation 'org.mockito:mockito-core:5.5.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.5.0'

implementation "org.junit.platform:junit-platform-launcher:$junitPlatformLauncherVersion"
implementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
implementation "org.junit.vintage:junit-vintage-engine:$junitVersion"
// implementation 'org.eclipse.jdt:org.eclipse.jdt.core:3.32.0'
testImplementation project(':android-test-utils')
}

Expand Down
Loading
Loading