feat(muscript): add jar with all modules for use in jfmods
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2024-04-14 10:54:31 +02:00
parent 2bcaf3336e
commit 8e696f8a2c
Signed by: Johannes
GPG Key ID: E76429612C2929F4
4 changed files with 58 additions and 3 deletions

View File

@ -20,7 +20,8 @@ Common code for my java projects. Uses my common [build scripts](https://git.fro
### muScript
(muscript is a simple scripting language, see [here](./muscript-runtime/README.md) for more information
- muscript-core: Core classes for muscript. Required by all other muscript modules
- muscript-all: Non-JPMS module shadowing the parser, serializer, optimizer, runtime, and data modules.
- muscript-core: Core classes for muscript. Required by all other muscript modules.
- muscript-ast: Implements the AST for muscript as algebraic data types. Contains no logic.
- muscript-data-dynamic: Implements the dynamic data model for muscript.
- muscript-data-additional: Implements additional data types for muscript, including the [standard library](./muscript-runtime/StandardLib.md).
@ -28,7 +29,6 @@ Common code for my java projects. Uses my common [build scripts](https://git.fro
- muscript-serialize: Implements a Decompiler for muscript. It is called this because it can be used to serialize Dynamic data.
- muscript-optimizer: Implements a simple optimizer for muscript. Entirely optional.
- muscript-runtime: Implements a runtime for muscript, based on muscript-data-dynamic for runtime data representation but with optimizations for typed expressions.
- muscript-json: Implements a json serializer for muscript. It is called this because it can be used to serialize Dynamic data.
- [muscript-json](./muscript-json/README.md): Glue code for manipulating json with muscript
### Interop

View File

@ -5,6 +5,7 @@ gradle-kotlin-dsl = "4.3.0"
jf-scripts = "1.5-SNAPSHOT"
gson = "2.10.3-SNAPSHOT"
google-truth = "1.4.2"
shadow = "8.1.1"
[libraries]
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
@ -15,4 +16,7 @@ gson = { module = "io.gitlab.jfronny:gson", version.ref = "gson" }
google-truth = { module = "com.google.truth:truth", version.ref = "google-truth" }
plugin-kotlin = { module = "org.gradle.kotlin:gradle-kotlin-dsl-plugins", version.ref = "gradle-kotlin-dsl"}
plugin-convention = { module = "io.gitlab.jfronny:convention", version.ref="jf-scripts" }
plugin-convention = { module = "io.gitlab.jfronny:convention", version.ref="jf-scripts" }
[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref="shadow" }

View File

@ -0,0 +1,50 @@
import io.gitlab.jfronny.scripts.*
import org.gradle.api.internal.catalog.DelegatingProjectDependency
plugins {
commons.library
alias(libs.plugins.shadow)
}
dependencies {
fun depend(dep: DelegatingProjectDependency) {
shadow(dep) { isTransitive = false }
implementation(dep)
}
depend(projects.muscriptCore)
depend(projects.muscriptAst)
depend(projects.muscriptDataDynamic)
depend(projects.muscriptDataAdditional)
depend(projects.muscriptParser)
depend(projects.muscriptSerialize)
depend(projects.muscriptOptimizer)
depend(projects.muscriptRuntime)
}
tasks.shadowJar {
mergeServiceFiles()
archiveClassifier = ""
configurations.clear()
from(project.configurations.shadow, tasks.jar)
}
tasks.jar {
archiveClassifier = "dev"
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "io.gitlab.jfronny"
artifactId = "muscript-all"
from(components["java"])
setArtifacts(listOf(tasks.shadowJar, tasks.sourcesJar))
}
}
}
// Otherwise we can't easily overwrite the artifacts to publish while keeping dependency metadata
tasks.withType<GenerateModuleMetadata> {
enabled = false
}

View File

@ -13,6 +13,7 @@ include("commons-serialize-databind")
include("commons-serialize-databind-api")
include("commons-serialize-databind-sql")
// new muscript
include("muscript-all")
include("muscript-core")
include("muscript-ast")
include("muscript-data-dynamic")