JetBrains / intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
https://plugins.jetbrains.com/docs/intellij/gradle-prerequisites.html
Apache License 2.0
1.42k stars 270 forks source link

Make `PRODUCTS_RELEASES_ANDROID_STUDIO` and `PRODUCTS_RELEASES_JETBRAINS_IDES` configurable #1686

Closed mr-thierry closed 1 month ago

mr-thierry commented 1 month ago

What happened?

Using 2.0.0-beta8, these URLs cannot be configured. We build our plugins on an internal CI server which cannot access the URL. We maintain an internal proxy to these files. But with 2.0.0-beta8 it is not possible to configure a different URL.

Relevant log output or stack trace

No response

Steps to reproduce

  1. Create a plugin
  2. Build the plugin on a server that cannot access https://www.jetbrains.com/updates/updates.xml
  3. The build will fail

Gradle IntelliJ Plugin version

2.0.0-beta8

Gradle version

8.8

Operating System

None

Link to build, i.e. failing GitHub Action job

No response

hsz commented 1 month ago

Thanks for highlighting that, Roy! I did some refactoring around so-called Build Features and created a mechanism for accepting not only boolean values. Having that, I could easily introduce Gradle properties for customizing mentioned URLs.

Starting from 2.0.0-beta9, you'll be able to set in gradle.properties file:

org.jetbrains.intellij.platform.productsReleasesAndroidStudioUrl=https://jb.gg/android-studio-releases-list.xml
org.jetbrains.intellij.platform.productsReleasesJetBrainsIdesUrl=https://www.jetbrains.com/updates/updates.xml
mr-thierry commented 1 month ago

Thanks for the fast follow-up!

That being said, wouldn't it make more sense to be part of the build config? i.e. in build.gradle.kts something like:

intellijPlatform {
   productsReleasesAndroidStudioUrl=https://jb.gg/android-studio-releases-list.xml
   productsReleasesJetBrainsIdesUrl=https://www.jetbrains.com/updates/updates.xml
}
hsz commented 1 month ago

I get your point, but one should not often adjust this. Also, the mechanism of resolving dependencies is pretty deep — that part is executed in dependencies resolution, and passing IntelliJ Platform extension properties down there would be tricky.