Skip to content

Commit

Permalink
chore: remote FTL root POM; ftl-runtime POM is standalone
Browse files Browse the repository at this point in the history
fixes #1019
  • Loading branch information
worstell committed Mar 14, 2024
1 parent 697def2 commit da050ae
Show file tree
Hide file tree
Showing 10 changed files with 374 additions and 468 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Build Cache
uses: ./.github/actions/build-cache
- name: Test
run: mvn test --batch-mode
run: mvn -f kotlin-runtime/ftl-runtime -B test
test:
name: Test Go
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ jobs:
cache: "maven"
- name: Publish JARs # Snapshots are published first, then the tagged release
run: |
mvn -U -B clean deploy -P release
mvn -B versions:set -DnewVersion="$(git describe --tags --abbrev=0 | cut -c2-)" -DprocessAllModules -DgenerateBackupPoms=false
mvn -U -B clean deploy -P release
mvn -f kotlin-runtime/ftl-runtime -U -B clean deploy -P release
mvn -f kotlin-runtime/ftl-runtime -B versions:set -DnewVersion="$(git describe --tags --abbrev=0 | cut -c2-)" -DprocessAllModules -DgenerateBackupPoms=false
mvn -f kotlin-runtime/ftl-runtime -U -B clean deploy -P release
git clean -f ./*.flattened_pom.xml
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/writecache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Rebuild All
run: bit
- name: Download Maven Dependencies
run: mvn dependency:resolve --batch-mode
run: mvn -f kotlin-runtime/ftl-runtime dependency:resolve --batch-mode
- name: Download Go Dependencies
run: go mod download -x
- id: find-go-build-cache
Expand Down
7 changes: 3 additions & 4 deletions Bitfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PROTO_OUT = backend/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go \
COMMON_LOG_IN = internal/log/api.go
COMMON_LOG_OUT = internal/log/log_level_string.go

KT_RUNTIME_IN = kotlin-runtime/ftl-runtime/**/*.{kt,kts} pom.xml kotlin-runtime/ftl-runtime/**/pom.xml
KT_RUNTIME_IN = kotlin-runtime/ftl-runtime/**/*.{kt,kts} kotlin-runtime/ftl-runtime/**/pom.xml
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

Expand Down Expand Up @@ -113,9 +113,8 @@ kotlin-runtime/external-module-template.zip: kotlin-runtime/external-module-temp
%{KT_RUNTIME_OUT}: %{KT_RUNTIME_IN} %{PROTO_IN}
# TODO: Figure out how to make Maven build completely offline. Bizarrely "-o" does not do this.
build:
mvn -B -N install
mvn -Dmaven.test.skip=true -B -pl :ftl-runtime install
+clean: mvn -B -pl :ftl-runtime clean
mvn -f kotlin-runtime/ftl-runtime -Dmaven.test.skip=true -B install
+clean: mvn -f kotlin-runtime/ftl-runtime -B install clean

%(dirname %{KT_RUNTIME_RUNNER_TEMPLATE_OUT})%:
build: install -m 0700 -d %{OUT}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.controller
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WORKDIR /src

# Seed some of the most common tools - this will be cached
RUN go version
RUN mvn -B --version
RUN mvn -f kotlin-runtime/ftl-runtime -B --version

# Download Go dependencies separately so Docker will cache them
COPY go.mod go.sum ./
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN hermit install openjre-18.0.2.1_1
RUN hermit uninstall openjre
RUN hermit install jbr
RUN go version
RUN mvn -B --version
RUN mvn -f kotlin-runtime/ftl-runtime -B --version

WORKDIR /src

Expand Down
4 changes: 1 addition & 3 deletions buildengine/discover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"context"
"testing"

"github.com/alecthomas/assert/v2"

"github.com/TBD54566975/ftl/common/moduleconfig"
"github.com/TBD54566975/ftl/internal/log"
)
Expand Down Expand Up @@ -40,7 +38,7 @@ func TestDiscoverModules(t *testing.T) {
Language: "kotlin",
Realm: "home",
Module: "echo",
Build: "mvn -B compile",
Build: "mvn -f kotlin-runtime/ftl-runtime -B compile",
Deploy: []string{
"main",
"classes",
Expand Down
2 changes: 1 addition & 1 deletion common/moduleconfig/moduleconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func setConfigDefaults(moduleDir string, config *ModuleConfig) error {
switch config.Language {
case "kotlin":
if config.Build == "" {
config.Build = "mvn -B compile"
config.Build = "mvn -f kotlin-runtime/ftl-runtime -B compile"
}
if config.DeployDir == "" {
config.DeployDir = "target"
Expand Down
Loading

0 comments on commit da050ae

Please sign in to comment.