I have two properties file, gradle.proerties and configuration.properties, How can i read value from gradle.properties to configuration.properties, Is it even possible syntactically
Asked
Active
Viewed 102 times
0
-
https://stackoverflow.com/questions/37101589/how-to-read-a-properties-files-and-use-the-values-in-project-gradle-script – ashu May 20 '21 at 06:30
-
this is reading properties file in gradle , my requirement is reading property from property file – Neha Rathore May 20 '21 at 10:25
1 Answers
0
Properties properties = new Properties()
properties.load(project.rootProject.file('onfiguration.properties').newDataInputStream())
def sdkDir = properties.getProperty('your_key')

Muhammad Ahmed
- 1,038
- 1
- 7
- 7
-
this is reading properties file in gradle , my requirement is reading property from property file – – Neha Rathore May 20 '21 at 10:25
-
While code-only answers might answer the question, you could significantly improve the quality of your answer by providing context for your code, a reason for why this code works, and some references to documentation for further reading. From [answer]: _"Brevity is acceptable, but fuller explanations are better."_ – Pranav Hosangadi May 20 '21 at 20:59