Skip to content

Commit b0f5145

Browse files
authored
Delete :intellij Gradle subproject (#4412)
It is no longer a relevant configuration after the plugin split in the 3.0 release
1 parent 83b4ea1 commit b0f5145

File tree

13 files changed

+69
-48
lines changed

13 files changed

+69
-48
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ reported the issue. Please try to include as much information as you can. Detail
3434
3535
### Instructions
3636
37-
1. Clone the github repository and run `./gradlew :plugin-toolkit:intellij:buildPlugin` <br/> (This will produce a plugin zip under `plugins/toolkit/intellij/build/distributions`)
38-
2. In your JetBrains IDE (e.g. IntelliJ) navigate to the `Plugins` preferences and select "Install Plugin from Disk...", navigate to the zip file produced in step 1.
39-
3. You will be prompted to restart your IDE.
37+
1. Clone the github repository.
38+
2. To manually build a plugin distribution, run the `buildPlugin` task on the relevant Gradle project.
39+
- For example, `./gradlew :plugin-toolkit:intellij-standalone:buildPlugin` will produce a plugin zip under `plugins/toolkit/intellij-standalone/build/distributions`.
40+
- You can also run the `:plugin-core:buildPlugin` and `:plugin-amazonq:buildPlugin` tasks
41+
- Use the `-PideProfileName={JETBRAINS_VERSION}` option to build the plugin for a particular IDE version (e.g `./gradlew :plugin-toolkit:intellij-standalone:buildPlugin -PideProfileName=2024.1`)
42+
3. In your JetBrains IDE (e.g. IntelliJ) navigate to the `Plugins` preferences and select "Install Plugin from Disk...", navigate to the zip file(s) produced in step 2.
43+
4. You will be prompted to restart your IDE.
4044
4145
## Contributing via Pull Requests
4246
@@ -84,13 +88,19 @@ If ran using the Debug feature, a debugger will be auto-attached to the sandbox
8488
8589
```
8690
# IntelliJ IDEA Community
87-
./gradlew :plugin-toolkit:intellij:runIde -PrunIdeVariant=IC
91+
./gradlew :plugin-toolkit:intellij-standalone:runIde -PrunIdeVariant=IC
92+
./gradlew :plugin-amazonq:runIde -PrunIdeVariant=IC
93+
./gradlew :sandbox-all:runIde -PrunIdeVariant=IC
8894

8995
# IntelliJ IDEA Ultimate
90-
./gradlew :plugin-toolkit:intellij:runIde -PrunIdeVariant=IU
96+
./gradlew :plugin-toolkit:intellij-standalone:runIde -PrunIdeVariant=IU
97+
./gradlew :plugin-amazonq:runIde -PrunIdeVariant=IU
98+
./gradlew :sandbox-all:runIde -PrunIdeVariant=IU
9199

92100
# Rider
93-
./gradlew :plugin-toolkit:intellij:runIde -PrunIdeVariant=RD
101+
./gradlew :plugin-toolkit:intellij-standalone:runIde -PrunIdeVariant=RD
102+
./gradlew :plugin-amazonq:runIde -PrunIdeVariant=RD
103+
./gradlew :sandbox-all:runIde -PrunIdeVariant=RD
94104

95105
# Gateway
96106
./gradlew :plugin-toolkit:jetbrains-gateway:runIde
@@ -101,7 +111,7 @@ If ran using the Debug feature, a debugger will be auto-attached to the sandbox
101111
102112
- To run the plugin in a **specific JetBrains IDE** (and you have it installed), specify the `ALTERNATIVE_IDE` environment variable:
103113
```
104-
ALTERNATIVE_IDE=/path/to/ide ./gradlew :plugin-toolkit:intellij:runIde
114+
ALTERNATIVE_IDE=/path/to/ide ./gradlew :plugin-toolkit:intellij-standalone:runIde
105115
```
106116
- This is needed to run PyCharm and WebStorm.
107117
- See also `alternativeIdePath` option in the `runIde` tasks provided by the Gradle IntelliJ Plugin [documentation](https://github.com/JetBrains/gradle-intellij-plugin).

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ tasks.createRelease.configure {
4747
}
4848

4949
dependencies {
50-
aggregateCoverage(project(":plugin-toolkit:intellij"))
50+
aggregateCoverage(project(":plugin-toolkit:intellij-standalone"))
51+
aggregateCoverage(project(":plugin-core"))
52+
aggregateCoverage(project(":plugin-amazonq"))
5153

5254
project.findProject(":plugin-toolkit:jetbrains-gateway")?.let {
5355
aggregateCoverage(it)
@@ -58,7 +60,7 @@ dependencies {
5860

5961
tasks.register("runIde") {
6062
doFirst {
61-
throw GradleException("Use project specific runIde command, i.e. :plugin-toolkit:intellij:runIde")
63+
throw GradleException("Use project specific runIde command, i.e. :plugin-toolkit:intellij-standalone:runIde")
6264
}
6365
}
6466

buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ tasks.buildPlugin {
141141
throwIfSubmodule("""
142142
The build generated by this task is not an accurate representation of what will be published to the JetBrains Marketplace.
143143
Please run the task associated with the composite build instead.
144-
(e.g. :plugin-toolkit:intellij:buildPlugin, :plugin-toolkit:jetbrains-gateway:buildPlugin, :plugin-amazonq:buildPlugin)
144+
(e.g. :plugin-toolkit:intellij-standalone:buildPlugin, :plugin-toolkit:jetbrains-gateway:buildPlugin, :plugin-amazonq:buildPlugin)
145145
""".trimIndent())
146146
}
147147
}
@@ -151,7 +151,7 @@ tasks.runIde {
151151
throwIfSubmodule("""
152152
The IDE sandbox generated by this task is not an accurate representation of what will be published to the JetBrains Marketplace.
153153
Please run the task associated with the composite build instead.
154-
(e.g. :plugin-toolkit:intellij:runIde, :plugin-toolkit:jetbrains-gateway:runIde, :plugin-amazonq:runIde)
154+
(e.g. :plugin-toolkit:intellij-standalone:runIde, :plugin-toolkit:jetbrains-gateway:runIde, :plugin-amazonq:runIde)
155155
""".trimIndent())
156156
}
157157

buildspec/linuxTests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ phases:
3333
3434
- chmod +x gradlew
3535
- su codebuild-user -c "./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME check coverageReport --info --stacktrace --console plain --continue"
36-
- ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME :plugin-toolkit:intellij:buildPlugin
36+
- ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME :plugin-toolkit:intellij-standalone:buildPlugin :plugin-core:buildPlugin :plugin-amazonq:buildPlugin
3737
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
3838
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site
3939
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
@@ -50,7 +50,7 @@ phases:
5050
- rsync -rmq --include='*/' --include '**/build/idea-sandbox/system*/log/**' --exclude='*' . $TEST_ARTIFACTS/ || true
5151
- rsync -rmq --include='*/' --include '**/build/reports/**' --exclude='*' . $TEST_ARTIFACTS/ || true
5252
- rsync -rmq --include='*/' --include '**/test-results/**/*.xml' --exclude='*' . $TEST_ARTIFACTS/test-reports || true
53-
- cp -r ./plugins/toolkit/intellij/build/distributions/*.zip $BUILD_ARTIFACTS/ || touch $BUILD_ARTIFACTS/build_failed
53+
- cp -r ./plugins/**/build/distributions/*.zip $BUILD_ARTIFACTS/ || touch $BUILD_ARTIFACTS/build_failed
5454

5555
reports:
5656
unit-test:
@@ -68,4 +68,4 @@ artifacts:
6868
files:
6969
- /tmp/buildArtifacts/*
7070
discard-paths: yes
71-
name: plugin.zip
71+
name: plugins.zip

buildspec/linuxUiTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ phases:
4545
credential_source=EcsContainer"
4646
4747
- chmod +x gradlew
48-
- ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME :plugin-toolkit:intellij:buildPlugin --console plain --info
48+
- ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME :sandbox-all:prepareUiTestingSandbox --console plain --info
4949

5050
- ffmpeg -loglevel quiet -nostdin -f x11grab -video_size ${SCREEN_WIDTH}x${SCREEN_HEIGHT} -i ${DISPLAY} -codec:v libx264 -pix_fmt yuv420p -vf drawtext="fontsize=48:box=1:[email protected]:boxborderw=5:fontcolor=white:x=0:y=h-text_h:text='%{gmtime\:%H\\\\\:%M\\\\\:%S}'" -framerate 12 -g 12 /tmp/screen_recording.mp4 &
5151
- ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME uiTestCore coverageReport --console plain --info

plugins/toolkit/intellij/build.gradle.kts

Lines changed: 0 additions & 13 deletions
This file was deleted.

plugins/toolkit/intellij/src/main/resources/META-INF/plugin-shim.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

plugins/toolkit/jetbrains-core/build.gradle.kts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ intellijToolkit {
2626
ideFlavor.set(IdeFlavor.IC)
2727
}
2828

29+
intellij {
30+
plugins.add(project(":plugin-core"))
31+
}
32+
2933
val changelog = tasks.register<GeneratePluginChangeLog>("pluginChangeLog") {
3034
includeUnreleased.set(true)
3135
changeLogFile.set(project.file("$buildDir/changelog/change-notes.xml"))
@@ -144,10 +148,24 @@ tasks.processTestResources {
144148
// TODO how can we remove this. Fails due to:
145149
// "customerUploadedEventSchemaMultipleTypes.json.txt is a duplicate but no duplicate handling strategy has been set"
146150
duplicatesStrategy = DuplicatesStrategy.INCLUDE
151+
}
147152

148-
// delete when fully split
149-
// pull in shim to make tests pass
150-
from(project(":plugin-toolkit:intellij").file("src/main/resources"))
153+
// delete when fully split
154+
// pull in shim to make tests pass
155+
val dummyPluginJar = tasks.register<Jar>("dummyPluginJar") {
156+
archiveFileName.set("dummy.jar")
157+
158+
from(project.file("test-plugin-shim.xml")) {
159+
rename { "plugin-shim.xml" }
160+
into("META-INF")
161+
}
162+
}
163+
164+
tasks.prepareTestingSandbox {
165+
dependsOn(dummyPluginJar)
166+
167+
intoChild(pluginName.map { "$it/lib" })
168+
.from(dummyPluginJar)
151169
}
152170

153171
dependencies {
@@ -196,6 +214,5 @@ dependencies {
196214
testRuntimeOnly(libs.slf4j.jdk14)
197215

198216
// delete when fully split
199-
testRuntimeOnly(project(":plugin-core:jetbrains-community"))
200217
testRuntimeOnly(project(":plugin-amazonq", "moduleOnlyJars"))
201218
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. -->
2+
<!-- SPDX-License-Identifier: Apache-2.0 -->
3+
4+
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
5+
<depends>aws.toolkit.core</depends>
6+
<xi:include href="/META-INF/module-amazonq.xml" />
7+
</idea-plugin>

plugins/toolkit/jetbrains-rider/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ intellijToolkit {
4242

4343
intellij {
4444
type.set("RD")
45+
plugins.add(project(":plugin-core"))
4546
}
4647

4748
sourceSets {

0 commit comments

Comments
 (0)