gradle.properties 로 기본 빌드 환경을 설정할 수 있다.$HOME/.gradle/gradle.properties 프로젝트홈/gradle.properties-Dsome.propertybuildEnvironment Task로 build 의존성을 확인할 수 있다. (Gradle 2.10 or later)gradlew buildEnvironment
org.gradle.daemon=true/false : Gradle 대몬으로 실행할지 여부org.gradle.java.homeorg.gradle.jvmargsSystem.setProperty('키','값')systemProp.프라퍼티이름=프라퍼티값
gradle.properties에 지정된 시스템 프라퍼티는 -D 옵션으로 덮어쓰기가 안되는 문제가 있다. [GRADLE-2122] Can props from gradle.properties be overwritten with -D parameter ? - Gradle Issuesparent.gradle 에서 child.gradle 을 apply 할때, child.gradle에서 함수를 등록해서 parent.gradle에서 사용하는 경우parent.gradleapply from: 'child.gradle' childFunction("args...")
child.gradledef childFunction(arg1, arg2) { // do somethings.. } ext { // 함수 등록 childFunction = this.&childFunction } ------------ // 혹은 ext 에 직접 등록 ext.childFunction = { args -> // do somethings }
gradle.properties에 다음 추가. Proxy 서버는 알아서 변경.user 이하 생략 가능.systemProp.http.proxyHost=www.somehost.org systemProp.http.proxyPort=8080 systemProp.http.proxyUser=userid systemProp.http.proxyPassword=password systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost systemProp.https.proxyHost=www.somehost.org systemProp.https.proxyPort=8080 systemProp.https.proxyUser=userid systemProp.https.proxyPassword=password systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost