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

Gradle build endpoint does not work properly with Gradle Kotlin DSL #943

Open
sdeleuze opened this issue Jul 9, 2019 · 3 comments
Open

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Jul 9, 2019

In IntelliJ IDEA, when I select Kotlin + Gradle config (not Gradle project) the generated config is broken since a build.gradle file is generated with a Gradle Kotlin DSL content. The name of the file should be build.gradle.ktslike with Gradle project generation.

Also the content seems incorrect in some parts like tasks.withType < KotlinCompile > instead of tasks.withType<KotlinCompile> and various other glitches demonstrated in this video https://youtu.be/UVZ4wGnnzNQ from the original reporter @AlexCzar.

@snicoll snicoll changed the title Gradle Kotlin DSL broken when selecting Gradle config Gradle build endpoint does not work properly with Gradle Kotlin DSL Jul 9, 2019
@snicoll
Copy link
Contributor

snicoll commented Jul 9, 2019

There are other problems potentially with this approach that we overlooked:

  • Since we moved to the recommended Gradle API (not using build/ext), a Gradle build has 2 separate files
  • Our endpoint was created before all this and is named build.gradle

The side effects you are describing are weird so we'll have to look to them. @AlexCzar can you share why you're using the option to start a project with only a build file? Nothing wrong with that, just curious.

@AlexCzar
Copy link

AlexCzar commented Jul 15, 2019

@snicoll Sure, I was just trying things out and that seemed the most logical option considering my usual workflow. Here's why:
Usually when I start a new project, I start with writing a build file, then I import it into IntelliJ.
It did not make sense to me to ask for a project archive from IntelliJ interface as opposed to a web page.
Now that I've tried, I know that it automatically handles extracting and then imports the extracted project, but this behaviour is not obvious from the interface. I didn't want to deal with an archive manually.

That said, archive also has similar problems (see attached screenshots), except file name is now correct.
screenshot_20190715_105501

screenshot_20190715_105431

@wilkinsona
Copy link
Contributor

Thanks, @AlexCzar. The problem you're seeing with an archive is specific to the combination of Kotlin DSL and REST Docs. It's being tracked by #922.

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

No branches or pull requests

4 participants