初识gradle||安装||初级使用

  • gradle

    Gradle is an open-source build automation tool focused on flexibility and performance.

    Gradle build scripts are written using a Groovy or Kotlin DSL.

  • Download and install Gradle

  • Prerequisities

    WSL-Ubuntu安装OpenJDK 14

    Gradle runs on all major operating systems and requires only a Java Development Kit version 8 or higher to run.

    # check jave version
    $ jave -version
    
  • Installing manually
    sudo mkdir /opt/gradle
    cd /opt/gradle
    wget https://gradle.org/next-steps/?version=6.7.1&format=all
    sudo unzip -d /opt/gradle gradle-6.7.1-all.zip
    sudo nano /etc/profile
    
    

    export PATH=$PATH:/opt/gradle/gradle-6.7.1/bin

  • 问题:ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/oracle_jdk8

    $ vim ~/.bashrc
    JAVA_HOME=/usr/java/jdk-15.0.1 # JDK安装路径
    PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
    export JAVA_HOME
    export PATH
    
  • 初阶使用

    Sample Index

    Building Java Applications Sample

猜你喜欢

转载自blog.csdn.net/The_Time_Runner/article/details/112071463
今日推荐