Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI should use writeConveyorConfig VS printConveyorConfig #27

Open
manosbatsis opened this issue Aug 11, 2022 · 1 comment
Open

CLI should use writeConveyorConfig VS printConveyorConfig #27

manosbatsis opened this issue Aug 11, 2022 · 1 comment

Comments

@manosbatsis
Copy link

Expect crazy errors when some random Gradle plugin or whatnot pollutes the output. In my case some android build version bumper was printing it's work, so i was getting:

manos@tower:~/git/foo$ conveyor make debian-package  --rerun 
❌ There was a problem parsing conveyor.conf.
Parse: Output of Gradle: 5: Key 'VersionCode 1206' may not be followed by token: 'gradle.build-dir' (if you intended 'gradle.build-dir' to be part of a key or string value, try enclosing the key or value in double
quotes)

Go figure eh? Took me a while to figure it out:

manos@tower:~/git/foo$ ./gradlew -q printConveyorConfig
VersionCode 1206
// Generated by the Conveyor Gradle plugin.

// Gradle project data. The build directory is useful for importing built files.
// ...
@mikehearn
Copy link
Member

Yes, the current Gradle integration is kinda hacky. Using writeConveyorConfig will fix it but then there's a risk of the Gradle build and Conveyor getting out of sync. Conveyor could read the config to learn that Gradle is being used, then invoke Gradle to write out the config snippet, then reload the config. But I think a better way is probably to use the tooling API to read data out of the plugin via Gradle's own RPC system; their tooling API makes that fairly straightforward. It's probably also faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants