Answer the question
In order to leave comments, you need to log in
How to write Gradle script for Android Studio?
Good afternoon!
Please tell me how to write instructions in the Gradle script so that when compiling the project, a text file with the content that I want is generated and this file is placed in the application's assets?
Answer the question
In order to leave comments, you need to log in
1. In Android Studio, create a folder for assets. Right click on app -> New -> Folder -> Assets Folder. This will also add asset generation to Gradle.
2. In buildscript, add task, for example:
task runSomePython(type:Exec) {
workingDir 'path_to_script'
commandLine 'python', 'somescript.py'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question