Gradle 教程學習

kingdelee發表於2019-06-24

[TOC]

1. 專案搭建

1.1 gradle

下載路徑: https://groovy.apache.org/download.html

解除安裝groovy:

brew uninstall gradle

mac安裝:

brew install groovy

壓縮包安裝:

cd /usr/local/
unzip apache-groovy-sdk-2.5.7.zip
ln -s groovy-2.5.7 groovy

修改環境變數:

sudo vim /etc/profile
--------------------------
export GROOVY_HOME=/usr/local/groovy

PATH="${JAVA_HOME}:${PATH}:${GRADLE_HOME}/bin:${MAVEN_HOME}/bin:${MYSQL}/bin:${PYQT_HOME}/bin:{ZOOKEEPER_HOME}/bin:${GROOVY_HOME}/bin"
export PATH
--------------------------
source ~/.zshrc

如果使用的是jdk9以上的,會warnning,換成jdk8就好了

groovy -version
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/usr/local/groovy/lib/groovy-2.5.7.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Groovy Version: 2.5.7 JVM: 11 Vendor: Oracle Corporation OS: Mac OS X

Gradle 教程學習

本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章