Skip to content

Commit

Permalink
build: spilt kotlinx & stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
Cdm2883 committed Jan 23, 2025
1 parent 2b855c8 commit b8d9311
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,23 @@ jobs:
fi
done
- name: Upload artifact (kotlinx)
uses: actions/upload-artifact@v4
with:
name: kotlinx-lib-${{ github.sha }}
path: plugin/kotlinx/build/libs/*.jar

# TODO: upload artifacts dynamically
- name: Upload artifact (core)
# - name: Upload artifact (<MODULE_NAME>)
# uses: actions/upload-artifact@v4
# with:
# name: kotlinx-<MODULE_NAME>-lib-${{ github.sha }}
# path: plugin/<MODULE_NAME>/build/libs/*.jar
- name: Upload artifact (stdlib)
uses: actions/upload-artifact@v4
with:
name: kotlinx-core-lib-${{ github.sha }}
path: plugin/core/build/libs/*.jar
name: kotlinx-stdlib-lib-${{ github.sha }}
path: plugin/stdlib/build/libs/*.jar
- name: Upload artifact (compose)
uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ plugins {
}

dependencies {
compileOnly(projects.plugin.core)
compileOnly(projects.plugin.kotlinx)
compileOnly(projects.plugin.stdlib)
compileOnly(projects.plugin.compose)
}

Expand Down
2 changes: 1 addition & 1 deletion plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fun basePluginDescriptor(names: Names) = """
"entrance": "${basePluginClassPackage(names)}.${basePluginClassName(names)}",
"name": "kotlinx-${names.kebab}-lib",
"description": "${
if (names.lodash == "core") "Kotlin-style Extension Library and Shared Standard Library for Allay Server"
if (names.lodash == "kotlinx") "Kotlin-style Extension Library for Allay Server"
else "Kotlinx Shared Library for Allay Server -- ${names.upperCamel}"
}",
"authors": [
Expand Down
3 changes: 3 additions & 0 deletions plugin/kotlinx/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies {
api(projects.core)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
dependencies {
api(projects.core)

api(kotlin("stdlib"))
api(kotlin("stdlib-jdk7"))
api(kotlin("stdlib-jdk8"))
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencyResolutionManagement {
}
}

val sharedDeps = arrayOf("core", "compose")
val sharedDeps = arrayOf("kotlinx", "stdlib", "compose")
include(":core")
include(":plugin")
include(":example")
Expand Down

0 comments on commit b8d9311

Please sign in to comment.