Skip to content

Commit

Permalink
feat: add onLoad method & build with ui task to gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
duruer committed Mar 5, 2024
1 parent acd7c0f commit a6ecb88
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ jobs:
distribution: temurin
java-version: 8

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"

- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: |
build
buildWithUI
-Pversion=${{ needs.get-next-version.outputs.new_tag_version }}
-PtimeStamp=${{ steps.time.outputs.time }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
Expand Down
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ dependencies {
}

tasks {
register("buildWithUI", Exec::class) {
commandLine("yarn")
commandLine("yarn", "build")
finalizedBy("build")
}

shadowJar {
val pluginId: String by project
val pluginClass: String by project
Expand Down
5 changes: 5 additions & 0 deletions src/Component.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script>
export let name;
</script>

Hello {name}!
6 changes: 4 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export default {
pluginLoaded: true
export {default as test} from "./Component.svelte";

export async function onLoad() {
console.log("hello world!")
}

0 comments on commit a6ecb88

Please sign in to comment.