Skip to content

Repository files navigation

Launch Jars

  1. Gradle build fat jars for multi module project
  • ./gradlew shadowjar
  1. Download the documents
  • java -jar /Users/jonathankee/examTopicScraper/static_page/Download/build/libs/Download-all.jar "1z0-071"
  1. Scrape the data from the documents
  • java -jar /Users/jonathankee/examTopicScraper/static_page/Document/build/libs/Document-all.jar
  1. Download the images
  • java -jar /Users/jonathankee/examTopicScraper/static_page/Image/build/libs/Image-all.jar

Clear assets for testing

cd /Users/jonathankee/examTopicScraper/static_page/src/main/resources rm -rf images/* rm -rf tmp/*

Highlights of project

Multithread code perfomance increase up to 9x

Multithread code perfomance increase up to 9x

Install SDKman

Link: https://sdkman.io/install/

MacOS installation:

For Gradle compatibility:

  • sdk install java 21.0.2-open
  • java -version

Java Networking resource

Link: https://github.com/PrashDev425/network-programming

Java multithread resource

Modern Concurrency in Java: Virtual Threads, Structured Concurrency, and Beyond By A N M Bazlur Rahman

Clean Build folder, Compile Fat Jar and Run it

  • ./gradlew clean
  • ./gradlew shadowJar
  • java -jar build/libs/static_page-1.0-SNAPSHOT-all.jar

Learn Gradle

More resource on Gradle

Link: https://koge.2bab.com/

How to create multi module java project with gradle https://www.youtube.com/watch?v=5ZYOyo8ciBo

Introduction to Gradle for Developers Prerequisites

Link: https://dpeuniversity.gradle.com/learning_paths/1a2955ed-499e-45e3-af54-9babd8427972/courses/012de84f-fcd3-45d4-9c4c-284382eb3f3f/activities/3dd8606c-d436-4962-bb02-0f8c613ab5db

Link: https://dpeuniversity.gradle.com/learning_paths/1a2955ed-499e-45e3-af54-9babd8427972/courses/012de84f-fcd3-45d4-9c4c-284382eb3f3f/activities/8450493b-7c4f-498d-9fe4-f3acd1af323a

There are two files

  • settings.gradle.kts
  • build.gradle.kts

Command to start a gradle project

  • gradle init

If we are building an executable app, pick 2:application If we are creating a library that will be used by others, pick 3:library If we are building gradle plugin to offer more functionality, pick 4:gradle plugin If we pick 1: basic, this gradle will create a basic layout and configuration, this is the default option

if we are asked how many subprojects will be in our application, we will specify "no" to indicate only 1

For the demo video: project name: calc source package name: com.gradlelab

Gradle Init result

Gradle Init result

Gradle w command

Gradle w command

Java related Plugins

Java related Plugins

  • ./gradlew tasks --all

add gradle.properties file to make .gradlew command output more information

tasks concepts

tasks conceptss

  • ./gradlew :compileJava
  • ./gradlew :cleanCompileJava

different dependencies

different dependencies

Project Suggestion

  • Use Componse multiplatform
  • add a simple note taking feature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages