简体   繁体   中英

How to disable gradle plugin by environments

I have two different environments say lower env and production. I have few gradle dependencies which should not get downloaded or used in production. So I want to block those plugins to get downloaded or activated in PROD.

I want the below plugins not to get added in prod, but in development and test environments .

// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-sleuth-zipkin-stream
compile group: 'org.springframework.cloud', name: 'spring-cloud-sleuth-zipkin-stream', version: '1.0.0.RELEASE'
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-sleuth
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '2.1.1.RELEASE'

There are two recommended ways to disable the Daemon persistently for an environment: Via environment variables: add the flag -Dorg.gradle.daemon=false to the GRADLE_OPTS environment variable. Via properties file: add org.gradle.daemon=false to the «GRADLE_USER_HOME»/gradle.properties file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM