From c9daf41bd98637b8c965a9a9c1fa2302750f0a86 Mon Sep 17 00:00:00 2001 From: Elizabeth Worstell Date: Thu, 16 Nov 2023 13:00:00 -0800 Subject: [PATCH] fix: only release generator executable; resolve child POMs --- .github/workflows/release.yml | 7 +- Bitfile | 6 +- Justfile | 4 +- kotlin-runtime/ftl-generator/pom.xml | 85 +++++++++++-- kotlin-runtime/ftl-runtime/pom.xml | 55 +++++++- pom.xml | 183 +++++++++++++++++---------- 6 files changed, 247 insertions(+), 93 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac69050050..5c8ab90288 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: + workflow_dispatch:g name: Release jobs: build-runner: @@ -113,13 +113,14 @@ jobs: - name: Publish JARs # Snapshots are published first, then the tagged release run: | mvn -U --batch-mode clean deploy -P release - mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false - mvn -U --batch-mode clean deploy -P release + mvn -Drevision=$(git describe --tags --abbrev=0 | cut -c2-) -U --batch-mode clean deploy -P release env: SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }} OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }} OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} GITHUB_TOKEN: ${{ github.token }} + - name: Remove `.flattened_pom.xml` files + run: git clean -f *.flattened_pom.xml create-release: name: Release Go Binaries runs-on: ubuntu-latest diff --git a/Bitfile b/Bitfile index b7f2b499b4..3e45228f49 100644 --- a/Bitfile +++ b/Bitfile @@ -36,7 +36,7 @@ KT_RUNTIME_OUT = kotlin-runtime/ftl-runtime/target/ftl-runtime-1.0-SNAPSHOT.jar KT_RUNTIME_RUNNER_TEMPLATE_OUT = build/template/ftl/jars/ftl-runtime.jar KT_GENERATOR_IN = kotlin-runtime/ftl-generator/**/*.{kt,kts} pom.xml kotlin-runtime/ftl-runtime/**/pom.xml %{KT_RUNTIME_OUT} -KT_GENERATOR_OUT = kotlin-runtime/ftl-generator/target/ftl-generator-1.0-SNAPSHOT-jar-with-dependencies.jar +KT_GENERATOR_OUT = kotlin-runtime/ftl-generator/target/ftl-generator-1.0-SNAPSHOT.jar CLIENT_OUT = frontend/dist/index.html CLIENT_IN = frontend/src/**/* @@ -108,13 +108,13 @@ kotlin-runtime/scaffolding.zip: kotlin-runtime/scaffolding/**/* %{KT_RUNTIME_OUT}: %{KT_RUNTIME_IN} %{PROTO_IN} build: mvn -N install - mvn -pl :ftl-runtime install + mvn -pl :ftl-runtime -am install +clean: mvn -pl :ftl-runtime clean %{KT_GENERATOR_OUT}: %{KT_GENERATOR_IN} build: mvn -N install - mvn -pl :ftl-generator install + mvn -pl :ftl-generator -am install +clean: mvn -pl :ftl-generator clean %(dirname %{KT_RUNTIME_RUNNER_TEMPLATE_OUT})%: diff --git a/Justfile b/Justfile index 80b52a31d9..329675fc31 100644 --- a/Justfile +++ b/Justfile @@ -7,11 +7,11 @@ install-root-jar: # Install ftl-generator JAR to local Maven repository install-generator-jar: - mvn -pl :ftl-generator install + mvn -pl :ftl-generator -am install # Install ftl-runtime JAR to local Maven repository install-runtime-jar: - mvn -pl :ftl-runtime install + mvn -pl :ftl-runtime -am install # Deploy the Go time module deploy-time: diff --git a/kotlin-runtime/ftl-generator/pom.xml b/kotlin-runtime/ftl-generator/pom.xml index dec27fe35c..bdc8079b5d 100644 --- a/kotlin-runtime/ftl-generator/pom.xml +++ b/kotlin-runtime/ftl-generator/pom.xml @@ -1,19 +1,21 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 xyz.block ftl - 1.0-SNAPSHOT + ${revision} ../../pom.xml ftl-generator jar + ${project.groupId}:${project.artifactId} + ${basedir}/../.. false @@ -28,35 +30,60 @@ ${project.groupId} ftl-runtime - ${project.parent.version} + ${project.version} com.github.ajalt.clikt clikt-jvm 4.2.1 + + com.squareup.wire + wire-runtime-jvm + + + com.squareup.wire + wire-grpc-server + + + com.squareup.wire + wire-grpc-client-jvm + + + org.jetbrains.kotlin + kotlin-stdlib + + + io.grpc + grpc-protobuf + + + io.grpc + grpc-stub + org.apache.maven.plugins - maven-assembly-plugin + maven-shade-plugin + shade-jar package - single + shade - - + false + + xyz.block.ftl.generator.MainKt - - - - jar-with-dependencies - + + + false @@ -89,4 +116,36 @@ + + + + release + + + + org.apache.maven.plugins + maven-shade-plugin + + + shade-jar + + true + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + flatten + package + + + + + + + \ No newline at end of file diff --git a/kotlin-runtime/ftl-runtime/pom.xml b/kotlin-runtime/ftl-runtime/pom.xml index 21a9638801..00e28fe7bb 100644 --- a/kotlin-runtime/ftl-runtime/pom.xml +++ b/kotlin-runtime/ftl-runtime/pom.xml @@ -7,13 +7,15 @@ xyz.block ftl - 1.0-SNAPSHOT + ${revision} ../../pom.xml ftl-runtime jar + ${project.groupId}:${project.artifactId} + ${basedir}/../.. false @@ -27,12 +29,6 @@ 1.9.21 - - org.jetbrains.kotlinx - kotlinx-coroutines-core - 1.7.3 - - io.gitlab.arturbosch.detekt detekt-api @@ -53,6 +49,51 @@ 2.10.1 + + com.squareup.wire + wire-runtime-jvm + + + com.squareup.wire + wire-grpc-server + + + com.squareup.wire + wire-grpc-client-jvm + + + org.jetbrains.kotlin + kotlin-stdlib + + + net.logstash.logback + logstash-logback-encoder + + + ch.qos.logback + logback-classic + + + ch.qos.logback + logback-core + + + io.grpc + grpc-netty + + + io.grpc + grpc-protobuf + + + io.grpc + grpc-stub + + + org.hotswapagent + hotswap-agent-core + + io.gitlab.arturbosch.detekt diff --git a/pom.xml b/pom.xml index 69b2ae3565..d5a2ee5058 100644 --- a/pom.xml +++ b/pom.xml @@ -1,14 +1,18 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 xyz.block ftl - 1.0-SNAPSHOT + ${revision} pom + FTL + Towards a 𝝺-calculus for large-scale systems + https://github.com/TBD54566975/ftl + The Apache License, Version 2.0 @@ -16,6 +20,24 @@ + + + Alec Thomas + TBD + https://github.com/TBD54566975 + + + Wes Billman + TBD + https://github.com/TBD54566975 + + + Elizabeth Worstell + TBD + https://github.com/TBD54566975 + + + scm:git:git://github.com/TBD54566975/ftl.git scm:git:ssh://github.com/TBD54566975/ftl.git @@ -38,6 +60,7 @@ 1.4.11 5.10.1 7.4 + 1.0-SNAPSHOT @@ -49,34 +72,68 @@ pom import + + com.squareup.wire + wire-runtime-jvm + ${wire.version} + + + com.squareup.wire + wire-grpc-server + ${wire.version} + + + com.squareup.wire + wire-grpc-client-jvm + ${wire.version} + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + + + + + net.logstash.logback + logstash-logback-encoder + ${logstash.version} + + + ch.qos.logback + logback-classic + ${logback.version} + + + ch.qos.logback + logback-core + ${logback.version} + + + + io.grpc + grpc-netty + ${grpc.version} + + + io.grpc + grpc-protobuf + ${grpc.version} + + + io.grpc + grpc-stub + ${grpc.version} + + + org.hotswapagent + hotswap-agent-core + 1.4.1 + - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} - - - - - net.logstash.logback - logstash-logback-encoder - ${logstash.version} - - - ch.qos.logback - logback-classic - ${logback.version} - - - ch.qos.logback - logback-core - ${logback.version} - - - org.junit.jupiter @@ -94,44 +151,6 @@ junit-jupiter-params test - - - - io.grpc - grpc-netty - ${grpc.version} - - - io.grpc - grpc-protobuf - ${grpc.version} - - - io.grpc - grpc-stub - ${grpc.version} - - - - com.squareup.wire - wire-runtime-jvm - ${wire.version} - - - com.squareup.wire - wire-grpc-server - ${wire.version} - - - com.squareup.wire - wire-grpc-client-jvm - ${wire.version} - - - org.hotswapagent - hotswap-agent-core - 1.4.1 - @@ -280,6 +299,32 @@ + + org.apache.maven.plugins + maven-shade-plugin + 3.5.1 + + + org.codehaus.mojo + flatten-maven-plugin + 1.5.0 + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + @@ -294,6 +339,14 @@ + + org.codehaus.mojo + flatten-maven-plugin + + ossrh + true + + org.apache.maven.plugins maven-release-plugin