Releases: cnruby/gradle_java
Releases · cnruby/gradle_java
Project--"basic_112"--for--The--Release
PROJECT IN THIS RELEASE
- develop simple web app with docker and tomcat
USING THE PROJECT
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/basic__112__01.zip
# DO (unzip the file)
unzip gradle_java-basic__112__01.zip && cd gradle_java-basic__112__01
# DO (build the application)
./gradlew clean build
# DO (create a docker image)
docker build --tag=112_gradle_java .
# DO (run a docker container with Java Web App)
docker run -p 80:8080 112_gradle_java
# DO (use the web application)
google-chrome http://localhost:80/
# >> Result
Hello Tomcat!
google-chrome http://localhost:80/hello
# >> Result
[7,7,7,7,0]Project--"basic_123"--for--The--Release
ABOUT
- develop simple Java application with Gradle
USAGE
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.123.1.zip -O gradle_java-0.123.1.zip
# DO (unzip the file)
unzip gradle_java-0.123.1.zip && cd gradle_java-0.123.1
# 1. Usage for the project
# DO (build and run the subproject `app`)
./gradlew -q app:run
# 2. Usage Subproject `app` for OS
# DO (install the subproject `app` as a distribution as-is)
./gradlew app:installDist
# DO (run application for the subproject `app` for Ubuntu OS)
./codename/app/build/install/app/bin/basic_123
# DO (run application for the subproject `app` for Windows OS)
./codename/app/build/install/app/bin/basic_123.batProject--"basic_122"--for--The--Release
ABOUT
- How to Run Web Application
USAGE
# 0. Download and Unzip the project and etc.
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.122.1.zip -O gradle_java-0.122.1.zip
# DO (unzip the file)
unzip gradle_java-0.122.1.zip && cd gradle_java-0.122.1
# DO (check the web application)
./gradlew -q check
# >> Result: nothing
# 1. Run the web project's application
# DO (run the web application)
./gradlew clean build
./gradlew appRun
# 2. Run the web project's application as-is
# DO (Install the project as a distribution as-is)
./gradlew archiveAllProducts
# DO (run the web application for Ubuntu OS)
./build/output/_gradle_java/start.sh
# DO (run the web application for Windows OS)
./build/output/_gradle_java/start.bat
# 3. Run the web application as war
./gradlew appRunWarProject--"basic_121"--for--The--Release
ABOUT
- How to Publish Application to jcenter
USAGE
# 0. Download and Unzip the project and etc.
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.121.1.zip -O gradle_java-0.121.1.zip
# DO (unzip the file)
unzip gradle_java-0.121.1.zip && cd gradle_java-0.121.1
# DO (copy a JCenter's username and password sample file)
cp ./jcenter.properties.sample ~/jcenter.properties
# DO (check the application `App`)
./gradlew -q check
# >> Result: nothing
# 1. Run the java project's application
# DO (run the application `App`)
./gradlew -q run
# >> Result
Hello world.
# 2. Run the java project's application as-is
# DO (Install the project as a distribution as-is)
./gradlew installDist
# DO (run the application `App` for Ubuntu OS)
./build/install/_gradle_java/bin/_gradle_java
# DO (run the application `App` for Windows OS)
./build/install/_gradle_java/bin/_gradle_java.bat
# 3. Run the java application from bintray.com
wget https://dl.bintray.com/cnruby/gradle_java_jcenter/de/iotoi/_gradle_java/0.117.1/_gradle_java-0.117.1.zip
unzip _gradle_java-0.117.1.zip
./_gradle_java-0.117.1/bin/basic_117
# >> Result
Hello world.Project--"basic_117"--for--The--Release
ABOUT
- How to Publish Application to jcenter
USAGE
# 0. Download and Unzip the project
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.117.3.zip -O gradle_java-0.117.3.zip
# DO (unzip the file)
unzip gradle_java-0.117.3.zip && cd gradle_java-0.117.3
# 1. Run the java application on project
# DO (copy a JCenter's username and password sample file)
cp ./jcenter.properties.sample ~/jcenter.properties
# DO (edit the real JCenter's username and password)
# !!! first sign in JCenter by JCenter's username and password
nano ~/jcenter.properties
# DO (check the application `App`)
./gradlew -q check
# >> Result: nothing
# DO (run the application `App`)
./gradlew run
# >> Result
Hello world.
# 2. Run the java application on Local OS
# DO (Install the project as a distribution as-is)
./gradlew installDist
# DO (run the application `App` for Ubuntu OS)
./build/install/_gradle_java/bin/basic_117
# DO (run the application `App` for Windows OS)
./build/install/_gradle_java/bin/basic_117.bat
# 3. Upload the Java Application to JCenter
# DO (clean, build and upload the application)
./gradlew clean build bintrayUpload
# 4. Use the java application from JCenter
# DO (download the zip file)
# !!! change the `<your_jcenter_username>` and `<your_jcenter_repo_name>`
wget https://dl.bintray.com/<your_jcenter_username>/<your_jcenter_repo_name>/de/iotoi/_gradle_java/0.117.3/_gradle_java-0.117.3.zip
# DO (unzip the file)
unzip _gradle_java-0.117.3.zip
# DO (run the application `App` for Ubuntu OS)
./_gradle_java-0.117.3/bin/basic_117
# DO (run the application `App` for Windows OS)
./_gradle_java-0.117.3/bin/basic_117.bat
# >> Result
Hello world.Project--"basic_120"--for--The--Release
ABOUT
- Publish A Web Application to JCenter
- Publish A Web Application to Maven Local
USAGE
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.120.1.zip -O gradle_java-0.120.1.zip
# DO (unzip the file)
unzip gradle_java-0.120.1.zip && cd gradle_java-0.120.1
# 1. change your bintray info
# DO (copy a JCenter's username and password sample file)
cp ./jcenter.properties.sample ~/jcenter.properties
# DO (edit the real JCenter's username and password)
# !!! first sign in JCenter by JCenter's username and password
nano ~/jcenter.properties
# DO (edit the gradle properties file)
nano ./gradle.properties
# FILE (./gradle.properties)
bintrayRepo=<your_bintray_repo>
libraryName=<your_library_name>
group=<your_group_name>
version=<your_library_version>
description=<your_library_description>
vcsUrl=<your_library_github_repo_link>
# DO (check the web application)
./gradlew -q check
# >> Result: nothing
# 2. Usage for the project
# DO (spin up the web application)
./gradlew -q appRun
curl http://127.0.0.1:8080/
curl http://127.0.0.1:8080/hello
# DO (Enter Ctrl+C, then stop web server)
# 3. MUST Push the web application to your GitHub
# 4. Publish the library to bintray.com
./gradlew clean build bintrayUpload
# 5. Goto bintray.com
# DO (add your package to jcenter)
# !!! waiting for approved
# 6. Test the published web application
rm -rf _gradle_java.war
wget https://jcenter.bintray.com/de/iotoi/basic_120/0.120.1/basic_120-0.120.1.war -O _gradle_java.war
docker build --tag=120_gradle_java_image .
docker container rm 120_gradle_java_container
docker run -d --name=120_gradle_java_container -p 80:8080 120_gradle_java_image
sleep 5 && nc -vz localhost 80
curl http://127.0.0.1:80/
curl http://127.0.0.1:80/hello
docker stop 120_gradle_java_containerProject--"basic_118"--for--The--Release
ABOUT
- develop simple Java application with Gradle
USAGE
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.118.1.zip -O gradle_java-0.118.1.zip
# DO (unzip the file)
unzip gradle_java-0.118.1.zip && cd gradle_java-0.118.1
# 1. change your bintray info
# DO (copy a jcenter's username and password sample file)
cp ./jcenter.properties.sample ~/jcenter.properties
# DO (edit the real jcenter's username and password)
# !!! first sign in JCenter by jcenter's username and password
nano ~/jcenter.properties
# DO (edit the gradle properties file)
nano ./gradle.properties
# FILE (./gradle.properties)
bintrayRepo=<your_bintray_repo>
libraryName=<your_library_name>
group=<your_group_name>
version=<your_library_version>
description=<your_library_description>
vcsUrl=<your_library_github_repo_link>
# DO (check the application `App`)
./gradlew -q check
# >> Result: nothing
# 2. Usage for the project
# DO (build and run the subproject `app`)
./gradlew -q app:run
# >> Result: Hello world.
# 3. Usage Subproject `app` for Local OS
# DO (install the subproject `app` as a distribution as-is)
./gradlew app:installDist
# DO (run application for the subproject `app` for Ubuntu OS)
./app/build/install/app/bin/app
# DO (run application for the subproject `app` for Winsows OS)
./app/build/install/app/bin/app.bat
# 4. MUST Push the java project to your GitHub
# 5. Publish the library to bintray.com
./gradlew clean build bintrayUpload
# 6 Goto bintray.comProject--"basic_119"--for--The--Release
ABOUT
- develop simple Java application with Gradle
USAGE
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.119.1.zip -O gradle_java-0.119.1.zip
# DO (unzip the file)
unzip gradle_java-0.119.1.zip && cd gradle_java-0.119.1
# DO (build and run the subproject `app`)
./gradlew -q app:run
# DO (Use and Test The Library from the Website `bintrag.com)
if [ ! -d "libs" ]; then
mkdir libs
fi
wget -P ./libs/ https://dl.bintray.com/cnruby/gradle_java_jcenter/de/iotoi/basic_118/0.118.1/basic_118-0.118.1.jar
cp -f app/build.gradle.m1 app/build.gradle
./gradlew -q app:run
# DO (Use The Library from the `JCenter`)
cp -f app/build.gradle.m2 app/build.gradle
./gradlew -q app:run
- name: "Use a Library Package from Maven Local"
cp -f app/build.gradle.m3 app/build.gradle
./gradlew clean build publishToMavenLocal
./gradlew -q app:runProject--"basic_115"--for--The--Release
ABOUT
- develop simple Java application with Gradle
USAGE
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.115.1.zip -O gradle_java-0.115.1.zip
# DO (unzip the file)
unzip gradle_java-0.115.1.zip && cd gradle_java-0.115.1
# 1. Usage for the project
# DO (build and run the subproject `app`)
./gradlew -q app:run
# 2. Usage Subproject `app` for OS
# DO (install the subproject `app` as a distribution as-is)
./gradlew app:installDist
# DO (run application for the subproject `app` for Ubuntu OS)
./app/build/install/app/bin/basic_115
# DO (run application for the subproject `app` for Winsows OS)
./app/build/install/app/bin/basic_115.batProject--"basic_116"--for--The--Release
ABOUT
- How to Use Gradle Properties in the build file
USAGE
# DO (download the zip file)
wget https://github.com/cnruby/gradle_java/archive/v0.116.1.zip -O gradle_java-0.116.1.zip
# DO (unzip the file)
unzip gradle_java-0.116.1.zip && cd gradle_java-0.116.1
```bash
# 0. View the Codes
cat ./build.gradle
cat ./jcenter.properties.sample
cat ./gradle.properties
# 1. Run all checks
cp ./jcenter.properties.sample ~/jcenter.properties
./gradlew check
./gradlew dependencies
# 2. Use the project task "propertiesCommand"
./gradlew propertiesCommand -PBINTRAY_USER=username_cmd -PBINTRAY_API_KEY=1234567890qwertyuiopasdfghjklzxcvbnm1234 -PGPG_PASSPHRASE=password_cmd
# 3. Use the project task "propertiesGradle"
./gradlew propertiesGradle
# 4. Use the project task "propertiesGroovy"
./gradlew propertiesGroovy
# 5. Use the project task "propertiesSystem"
export BINTRAY_USER=username
export BINTRAY_API_KEY=1234567890qwertyuiopasdfghjklzxcvbnm1234
export GPG_PASSPHRASE=password
./gradlew propertiesSystem