intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Fixed #1799 by creating a separate intellijPlatformComposedJarApi (extends api & compileOnlyApi) configuration with JAVA_API usage attribute value. Also replaced java plugin by java-library plugin, because it is a more proper plugin for IntelliJ plugin projects (they are libraries).

Open AlexanderBartash opened this issue 1 year ago • 1 comments

Pull Request Details

Fixed #1799 by creating a separate intellijPlatformComposedJarApi (extends api & compileOnlyApi) configuration with JAVA_API usage attribute value. Also replaced java plugin by java-library plugin, because it is a more proper plugin for IntelliJ plugin projects (they are libraries).

This PR includes #1792, because it is not merged yet, which I need to fix tests, since master is broken right now The actual fix for this issue can be seen in https://github.com/JetBrains/intellij-platform-gradle-plugin/pull/1800/commits/d1c8ef8719b60b7119cad4bbf122c58330d5d378

Description

:point_up: + see #1799

These changes create a new outgoing variant:

--------------------------------------------------
Variant intellijPlatformComposedJar
--------------------------------------------------
IntelliJ Platform final composed Jar archive

Capabilities
    - 123:subpr:unspecified (default capability)
Attributes
    - org.gradle.category                = library
    - org.gradle.dependency.bundling     = external
    - org.gradle.jvm.environment         = standard-jvm
    - org.gradle.jvm.version             = 22
    - org.gradle.libraryelements         = composed-jar
    - org.gradle.usage                   = java-runtime
    - org.jetbrains.kotlin.platform.type = jvm
Artifacts
    - build/libs/subpr.jar (artifactType = jar)

--------------------------------------------------
Variant intellijPlatformComposedJarApi
--------------------------------------------------
IntelliJ Platform final composed Jar archive Api

Capabilities
    - 123:subpr:unspecified (default capability)
Attributes
    - org.gradle.category                = library
    - org.gradle.dependency.bundling     = external
    - org.gradle.jvm.environment         = standard-jvm
    - org.gradle.jvm.version             = 22
    - org.gradle.libraryelements         = composed-jar
    - org.gradle.usage                   = java-api
    - org.jetbrains.kotlin.platform.type = jvm
Artifacts
    - build/libs/subpr.jar (artifactType = jar)

Here is proof that it works (notice the fake build number, it is from my local maven, also kotlin plugin is commented out): image

Now org.jetbrains:annotations:26.0.1 is available and org.apache.commons:commons-lang3:3.5 is not, like it should be.

Related Issue

#1799

Motivation and Context

It was broken.

How Has This Been Tested

So far only manually.

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [ x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [ x] I have read the CONTRIBUTING document.
  • [x ] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ x] I have included my change in the CHANGELOG.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

AlexanderBartash avatar Oct 16 '24 14:10 AlexanderBartash