Skip to content

Commit 882b2e2

Browse files
CopilotMte90
andauthored
Fix plugin descriptor loading error and add CI artifact generation (#26)
Co-authored-by: Mte90 <403283+Mte90@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent ce1e448 commit 882b2e2

File tree

4 files changed

+23
-27
lines changed

4 files changed

+23
-27
lines changed

.github/workflows/kotlin-ci.yml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,40 +58,38 @@ jobs:
5858
run: ./gradlew --no-daemon --version
5959
working-directory: ide-plugins
6060

61-
- name: Full build with stacktrace (capture to file)
61+
- name: Build plugin
6262
env:
6363
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx3g"
6464
run: |
6565
set -o pipefail
66-
./gradlew build --no-daemon --stacktrace 2>&1 | tee ../gradle-build.log || true
66+
./gradlew buildPlugin --no-daemon --stacktrace 2>&1 | tee ../gradle-build.log
6767
working-directory: ide-plugins
68+
6869
- name: Upload build log
6970
uses: actions/upload-artifact@v4
7071
with:
7172
name: gradle-build-log-java-17
7273
path: gradle-build.log
74+
if: always()
7375

74-
- name: Build Kotlin plugin subproject if present
76+
- name: Prepare plugin artifact for upload
7577
run: |
76-
set -o pipefail
77-
if ./gradlew :kotlin:tasks --dry-run &>/dev/null; then
78-
echo "Detected :kotlin subproject -> building it"
79-
./gradlew :kotlin:build --no-daemon --stacktrace 2>&1 | tee ../kotlin-subproject-build.log || true
80-
echo "Uploading kotlin-subproject-build.log"
81-
ls -la ../kotlin-subproject-build.log || true
82-
elif ./gradlew :plugin:kotlin:tasks --dry-run &>/dev/null; then
83-
echo "Detected :plugin:kotlin subproject -> building it"
84-
./gradlew :plugin:kotlin:build --no-daemon --stacktrace 2>&1 | tee ../kotlin-subproject-build.log || true
85-
else
86-
echo "No explicit kotlin plugin subproject found; running assemble on all projects"
87-
./gradlew assemble --no-daemon --stacktrace 2>&1 | tee ../assemble.log || true
78+
cd ide-plugins/build/distributions
79+
PLUGIN_FILE=$(ls *.zip | head -n 1)
80+
if [ -n "$PLUGIN_FILE" ]; then
81+
# Create a temporary directory for extraction
82+
mkdir -p plugin-extracted
83+
# Extract the plugin zip
84+
unzip -q "$PLUGIN_FILE" -d plugin-extracted/
85+
# Remove the original zip
86+
rm "$PLUGIN_FILE"
8887
fi
89-
working-directory: ide-plugins
90-
- name: Upload kotlin-subproject/build logs if present
88+
if: success()
89+
90+
- name: Upload plugin artifact
9191
uses: actions/upload-artifact@v4
9292
with:
93-
name: kotlin-subproject-logs-java-17
94-
path: |
95-
kotlin-subproject-build.log
96-
assemble.log
97-
if: always()
93+
name: intellij-plugin-pr-${{ github.event.pull_request.number || github.run_number }}
94+
path: ide-plugins/build/distributions/plugin-extracted/
95+
if: success()

ide-plugins/build.gradle.kts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
id("org.jetbrains.intellij.platform") version "2.10.4"
55
}
66

7+
// Build configuration for PicoCode IntelliJ Plugin
78
group = "com.picocode"
89
version = project.findProperty("version") as String? ?: "0.0.1"
910

@@ -21,6 +22,7 @@ dependencies {
2122
intellijPlatform {
2223
intellijIdeaCommunity("2023.1")
2324
bundledPlugin("com.intellij.java")
25+
instrumentationTools()
2426
}
2527
}
2628

@@ -35,9 +37,4 @@ tasks {
3537
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
3638
}
3739
}
38-
39-
patchPluginXml {
40-
sinceBuild.set("231")
41-
untilBuild.set("241.*")
42-
}
4340
}

ide-plugins/src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<idea-plugin>
22
<id>com.picocode.rag-assistant</id>
33
<name>PicoCode RAG Assistant</name>
4+
<version>0.0.1</version>
45
<vendor>PicoCode</vendor>
56

67
<description><![CDATA[
75 Bytes
Loading

0 commit comments

Comments
 (0)