2012-12-17 2 views

답변

26

예, 있습니다. 당신은 당신의 빌드 스크립트에 다음 줄을 추가 할 수 없습니다 :

buildDir = 'your_directory' 

또는 gradle.properties 파일

(이 경우에 주위 your_directory 따옴표).
빌드 디렉토리는 프로젝트 속성입니다. 당신은 입력하여 사용 가능한 모든 프로젝트 속성을 볼 수 있습니다 :

gradle properties 
+0

'buildDir = 'R : \\ buildMaria''와 같은 Windows 절대 경로는'build.gradle'에서 작동했지만'gradle.properties'에서는 실패했습니다. http://stackoverflow.com/questions/29116000/gradle-make- 램 디스크 사용 –

+1

일부 env 변수로 끝낼 수 있습니까? 프로젝트에 CI를 구성해야합니다. – 4ntoine

1

당신은 파일에 project.buildDir = '당신의/디렉토리'를 추가 할 수 있습니다 별도의 라인에서 아무 곳이나 배치 할 수 있습니다 build.gradle

0

build.gradleproject.buildDir을 설정하거나 buildDir = PATHgradle.properties을 설정할 수 있습니다.

그리고이 같은 환경 변수에서

:

export GRADLE_OPTS=-Dorg.gradle.project.buildDir=/tmp/gradle-build 

여기에 문서의 환경 섹션을 구축 참조 : https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_environment_variables

을 쓰기는 (에 대한 buildDir 속성) 여기에 스크립트를 작성 : https://docs.gradle.org/current/userguide/writing_build_scripts.html

(이 글을 쓸 때 현재 버전의 글 : 4.5)

관련 문제