Skip to content

Latest commit

 

History

History
88 lines (71 loc) · 1.72 KB

File metadata and controls

88 lines (71 loc) · 1.72 KB

export environment java home

$ export JAVA_HOME=/usr/lib/jvm/jdk-11.0.5/

one time project setup

$ gradle init --type java-library 
$ gradle wrapper --gradle-version=6.0.1 

how to build

$ ./gradlew build

how to test

$ # test everything
$ ./gradlew test

$ # test specific tests
$ ./gradlew test --tests *test1

$ # test a class
$ ./gradlew test --tests HttpTest

how do I dump all current project dependencies to a folder?

all the current dependencies should be available in dependencies folder after this command is executed

$ ./gradlew copyDependencies

how to import this project to eclipse

# generate eclipse configuration
$ ./gradlew eclipse

# import as existing project into eclipse

how to upgrade gradle

  1. check current version first
$ export JAVA_HOME=/usr/lib/jvm/jdk-11.0.5/
$ ./gradlew --version
  1. check gradle current release version at https://gradle.org/releases/
  2. upgrade it if no problem
$ ./gradlew wrapper --gradle-version 6.1.1
  1. check again version and test build
$ ./gradlew --version
$ ./gradlew clean build

Deployment

  1. build and release
    $ git checkout master
    $ # update VERSION IN build.gradle
    $ git commit -m "version bump"
    $ ./gradlew clean build uploadArchives
    
  2. login to https://s01.oss.sonatype.org/#stagingRepositories
    • click close
    • if all verifications run ok, then click release
  3. check release