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

Gradle Wrapper 7.x - 8.8 , updated break fix on the build and compilation process. #2643

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


After copying the root directory , run the
config.bat file



-----------------------------



1. To install a working directory initialized with gradle , there are two main options on the windows
machine .

1-a. run the gradlew.bat file.
1-b. Go to a terminal in the directory of the app and run , ./gradlew build.


---
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@


Installation notes by Vampeyer .

----------------------------------------
1. Build the project using Gradle:
Open a terminal in the project root directory and run:

./gradlew build
(On Windows, use gradlew.bat build instead) This will
compile your
code and create the necessary artifacts (like JAR files).


---------------------------------------------------------------------------------------
...... My gradlew.bat file and my ./gradlew build command both threw the same exception error
on my windows machine.


C:\Users\vampeyer\Desktop\HACKATHON-IN-48HRSD-OR-LESS\rootstock ----NOdes\rskj>gradlew.bat
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain



--------------------------------------------------------------------------------------------
....... I was going to build a simple node application for windows mac and android ,
but it would seem that this is a more critical use need for rootstack.

- Without a easily reproducible code base for nodes , we are left without a source of truth
for further building and extensive developing.

---- Lets be frank , with ourselves , without a working ,
- easily compilable
- easiy buildable ,
- easily raplicatable process , the entire thing is difficult , and that is a key
core neccesary feature for further adoption of the technology.

------------------------------------------------------------------------------------------------



- So , I will be carefully documenting these major breaks in a folder called ,
ERRORS-DURING-BUILD , along with some images to support the break fix request that is ,
---- required , to move forward , we have to be able to build on our machines !












_________________________________________________________________________________


Dear rootstock devs , also

We cannot afford intelli - J so please dont make too officail documentaion around its functionality ,
as it is a pricaey one !

Please release more basic IDE developing practices.





Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

----------------------------

Installing gradle on a local device quick and painlesly

-------------------


Prerequisites --- Java 21 + , reccommendeed JDK == Corretto
@ - https://aws.amazon.com/corretto/

-- Installing Gradle on a local dev machine ---

1. You may more easily download gradle , via another major windows package manager
and path it to your env variable automatically , as well !
( which is much more easier than the direct process , I am running
- gradle 8.8 , from chocolateys latest repo updates.

You may also use
PAckage managers such as
choclolatey , npm -g ( global ) , scoop , or winget.
--------------------------------------------------- -------------------------------------------
For this demonstration i used choco ,
To install choco , install Node , and in the installation of node on the machine ,
watch out for a check box that says ,
-- install chocololatey package manager via local machine.

--- verify the install with
*choco -v

- once your chocolatey package manager
installation is verified ,


2. Install gradle the easy way , via choco.

*choco install gradle


After installation
Verify the installation with

*gradle - v , in a command prompt.

______________________________________________________
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@




To recreate the file structure in the repositiory for a successful build ,
you must follow these steps.

This is specific to the gradle updates ,and this build ,
and this is a working and su-table method.



Step one ,

copy amd paste the /doc and /rjsk-core folders into the root directory.

then run ,


_______________________________________________________________________________________________________

*gradle init
-----------------------------------------------------------------------------------------------
C:\Users\vampeyer\Desktop\HACKATHON-IN-48HRSD-OR-LESS\rootstock---NOdes\GRADLE-REBUILD-NOTES
\GRADLESAMP2
> gradle init

Select type of build to generate:
1: Application
2: Library
3: Gradle plugin
4: Basic (build structure only)
Enter selection (default: Application) [1..4]----- 1

Select implementation language:
1: Java
2: Kotlin
3: Groovy
4: Scala
5: C++
6: Swift
Enter selection (default: Java) [1..6]---------------- 1

Enter target Java version (min: 7, default: 21):------ 21

Project name (default: GRADLESAMP2): rsjk

Select application structure:
1: Single application project
2: Application and library project
Enter selection (default: Single application project) [1..2]---- 1

Select build script DSL:
1: Kotlin
2: Groovy
Enter selection (default: Kotlin) [1..2] ------------------------2

Select test framework:
1: JUnit 4
2: TestNG
3: Spock
4: JUnit Jupiter
Enter selection (default: JUnit Jupiter) [1..4]------------------- 4

Generate build using new APIs and behavior (some features may change in the next minor release)? (default: no) [yes, no]
-------------- yes


> Task :init
To learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.8/samples/sample_building_java_applications.html

BUILD SUCCESSFUL in 1m 27s
1 actionable task: 1 executed
PS C:\Users\vampeyer\Desktop\HACKATHON-IN-48HRSD-OR-LESS\rootstock---NOdes\GRADLE-REBUILD-NOTES\GRADLESAMP2> gradle build



_______________________________________________________________________




---------------

Then running

*gradle build for gradle build CLI install with gradle wrapper , will build them

as well as the wrapper files for a regular local pull and run ,

as the read me originally described , the following commands now work under this build.
___________________________________________________________________________________


./gradlew build

&&

gradle.bat ,




These will also work by default now , for building the repository
with gradle ,


When pulling from this repository.


















____________________________________________________________________________

There are a few options , but the main commands are just .

*gradle init - followed by a series of selections and then
*gradle build


But only one set of the selections will follolow the proper directory structure.

./gradle
/gradle
/app
-
-
gradlew
gradlew.bat
settings.gradle

_______________________________________________________________________

50 changes: 50 additions & 0 deletions -Extra-Gradle-Notes--All-My-Notes/README-by-Vampeyer.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

- The build for the rjsk-core node repository wasw failing ,
-I had learned this was from a large update from Gradle.

- I learned and rebuilt and reinstalled gradle and reingineered the file system on the
main node rjsk repository , due to an outdated gradle wrapper.

--- This repository has a note from 2 years ago where it was updated to
--------------
Gradle 7.4.2

-- Again , the build failed , and then I had learned that the gradle wrapper was out of date.
- I had then chose the fixing of this build and breaking bug to be my main
project for the hackathon entry.

I have now upgraded the gradle build to

Gradle 8.8 , with a few more detailed notes.







-----------------------------------------------

To develop in this repository ,

simply make your changes and then run the same commands as before

* gradlew build

or

* ./gradlew build


commands , will build in the

* app/build/libs/app.jar file , and you should delete the build folder ,
before each build , as running the

*gradle build

command , will generate simply a new build folder and its needed
contents.



37 changes: 37 additions & 0 deletions -Extra-Gradle-Notes--All-My-Notes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# rjsk-Arrowhead
RskJ is a Java implementation of the Rootstock node. --- Rebuilt with Gradle 8.8

--- Main Notes -----
- The Gradle 7.x.x build in the current rjsk node repository , was causing a major build break issue.
- I had tried and repeated the process several times , with stil an error to build and run a node.

- So I have decided to make my entry to the hackathon a big bug build fix for rootstock.



---- Notes -----
- The Gradle 7.x.x build in the current rjsk node repository , was causing a major build break issue.
- Solid documentation for the break process and rebuilt , fix instructions are provided as well.
- Installed Gradle CLI , on local Dev env and updated Gradle Wrapper to Gradle 8.8
- Re-engineered file system during the process with new API gradle wrappers.



- Checked build with Local Gradle CLI - gradle build
- Checked build with gradlew file - gradlew build / ./gradlew build

This project can be much more easily maintained , and if any one else needs to upgrade the gradle wrapper again for any reason ,
I tried to provde sufficient documentation to start to assist.


The final project redacts some uneccesary config code , and should provide a more
stable environment for DRY principles , and overall easability.

--- Edit as needed , just give me my credit please and thank you.







21 changes: 21 additions & 0 deletions -Extra-Gradle-Notes--All-My-Notes/SHA256SUMS.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

229d29c693fbd89510443f869949b79369204d3465d1b99e37125ebb598a26b2 configure.sh
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEHxqnUDc7kNl5LcMheZeZnuo6kHkFAmL7wpIUHHN1cHBvcnRA
aW92bGFicy5vcmcACgkQeZeZnuo6kHkDJRAAzZWlJVXhLwr1brNgkxC5VlBOYzTO
DH8b39370omHRfZmFxCM5XuwtICcR7CSqZKotFONh3JdG7ewTxn0uvnMdqRKDXc6
pzsImgCmATmzHSkiPNVcplwPufIBsxTsAacNpqGEFtRCKW5EtxA/5aPFbmZo6TWw
EpN14ssJ0mtYGHiY+f+RBorZdbshugF0DtlkpQsL0argX94pu0ivLdAB6jiv5qBp
r+/qh7qfRc2TKO/eiJrr2Mtx9g77Hlg7ieSi64hDuqiwqq5ILDbYjuwD32Xgh7KP
a/JeEsaZ1/2z6mz0M1PQlw1b4C9vKa0H9ZrLY5+bIHcvBp63zRMBGQMdOQ7+uKBF
9Ea5sCfOKSVhg6O+x/1T3fvsbQ20/sOPErUG1uGysd+9zjNdVDuUseA43eto3DSv
snoJIRkgQ4DRjrcN39eVAiAzK8tPAVjYDvUbhLRIaacR1nw2S9oew+MTcvOrqiSX
tTCuogGSyNCXI9qa0lRFYgOMMqIwHCNmafzDdIU54N3nLnjVFaBeL8O1f/yhPmJC
HYDm2DoNVFPelCGzOLc89gaAbniglWY3pAUliLQiNE0+c/TBoacIMf6UTpCBHut+
YdvfHkTZMGj14b503IYinqZ3ToKKpTn+Q07bgMWKOWKyEqozLtW8tOna4pti22uE
sAdqUNvIQRgY7vk=
=2LH4
-----END PGP SIGNATURE-----
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading