Skip to content
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

chore: rename packages to hiero #2141

Merged
merged 17 commits into from
Dec 18, 2024
Merged

chore: rename packages to hiero #2141

merged 17 commits into from
Dec 18, 2024

Conversation

0xivanov
Copy link
Contributor

@0xivanov 0xivanov commented Dec 13, 2024

Description:

  • Rename packages to org.hiero
  • Switch licenses to SPDX-License
  • spotlessApply

Related issue(s): #2017

Fixes #

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@0xivanov 0xivanov self-assigned this Dec 13, 2024
@0xivanov
Copy link
Contributor Author

Hey @jjohannes , do you think it's possible to rename the packages to without breaking the example module?

@jjohannes
Copy link
Collaborator

Renaming a package is technically changing the API. To be consistent, we need to rename everything at once in my opinion:

  • The packages in sdk
    • All usages of classes from the packages in tests and examples
  • The Java Module Names here and here
  • The group for the Maven Coordinates here (and here in publishing CI config).

Users that switch to the new Hiero version of the SDK will have to adjust there imports to the new package(s). But the classes themselves will work as before. Only the imports need to be adjusted.

@0xivanov 0xivanov changed the title chore: rename packages in /sdk module chore: rename packages to hiero Dec 16, 2024
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
@0xivanov
Copy link
Contributor Author

@jjohannes I don't know why the examples are not building, i haven't touched them. Do you have any ideas?

@jjohannes
Copy link
Collaborator

I don't know why the examples are not building

With the rename, the examples now automatically use the last published version of the sdk (2.46.0).

That version is without the recent Guava/CheckerQual version update. But the build setup used for the example expects a newer version due to our strict Java Module setup. The newer version has a module-info and this is now expected.

You can update the Guava version in the example directly – dependency constraints block – to make it work with the previous version:
(Not this is only an issue in our strict checking setup, for users of the SDK without these strict checks, the example works)

dependencies.constraints {
    implementation("com.google.guava:guava:33.3.1-android")
    ...
}

Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.41%. Comparing base (b86ee46) to head (3752cbe).
Report is 202 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2141      +/-   ##
============================================
+ Coverage     82.20%   82.41%   +0.20%     
- Complexity     3588     4042     +454     
============================================
  Files           186      205      +19     
  Lines         11697    12911    +1214     
  Branches       1150     1283     +133     
============================================
+ Hits           9615    10640    +1025     
- Misses         1604     1813     +209     
+ Partials        478      458      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@0xivanov 0xivanov marked this pull request as ready for review December 16, 2024 16:00
@0xivanov 0xivanov requested review from a team as code owners December 16, 2024 16:00
mishomihov00
mishomihov00 previously approved these changes Dec 17, 2024
Copy link
Contributor

@mishomihov00 mishomihov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review applies to:
.github/workflows/build.yml
.github/workflows/release-artifacts.yml

tck/build.gradle.kts Outdated Show resolved Hide resolved
tck/build.gradle.kts Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
Signed-off-by: Ivan Ivanov <[email protected]>
jjohannes
jjohannes previously approved these changes Dec 17, 2024
@jjohannes
Copy link
Collaborator

The package for the protobuf-generated classes should probably also be changed:

See: https://github.com/hashgraph/hedera-sdk-java/blob/main/sdk/src/main/proto/account.proto#L28-L29
And all other proto files

The content of sdk/build/classes/java/main after building, shows if you still have any com.hedera classes.

@0xivanov
Copy link
Contributor Author

@jjohannes Nice observation! Done.

Copy link
Contributor

@rbarkerSL rbarkerSL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval applies to:

  • .github/workflows/release-artifacts.yml
  • example-android/app/build.gradle.kts
  • example-android/build.gradle.kts
  • example-android/settings.gradle.kts
  • examples/build.gradle.kts
  • settings.gradle.kts
  • tck/build.gradle.kts

Copy link
Contributor

@agadzhalov agadzhalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work, tyvm @0xivanov @jjohannes

@0xivanov 0xivanov merged commit dcddf04 into main Dec 18, 2024
7 checks passed
@0xivanov 0xivanov deleted the rename-packages-to-hiero branch December 18, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants