Closed thipokch closed 2 years ago
Gradle evaluates all the configuration an builds a task graph. The solution I use in my builds is to manipulate the taskGraph after it was build. Here is part of my build.gradle (in groovy) script that I have changed with your values:
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(buildDev)) {
xcodebuild {
scheme = 'pre'
target = 'darwin'
}
infoplist {
bundleIdentifier = 'com.example.pre'
bundleDisplayName = 'Example Preview'
}
}
if (taskGraph.hasTask(buildPre)) {
xcodebuild {
scheme = 'pre
target = 'darwin'
}
infoplist {
bundleIdentifier = 'com.example'
bundleDisplayName = 'example'
}
}
...
@renep Thanks for the quick reply. :)
Thanks for this awesome plug-in. I am trying to configure the plugin differently for each tasks, but it doesn't seems to work. The configurations in Kotlin DSL below seems to always use the last configuration. How would you go about configuring this?