Skip to content

Commit f2a8c8f

Browse files
committed
Lmax disruptor too
1 parent 6e43dd3 commit f2a8c8f

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

.github/unsafe/build-custom-armeria.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,15 @@ cd armeria
1717
# Apply patch to remove unsafe access
1818
git apply "${SCRIPT_DIR}/unsafe.patch"
1919

20-
# Build the core module
21-
./gradlew :core:jar -x javadoc -x :docs-client:nodeSetup -x :docs-client:npmSetup -x :docs-client:npmInstall -x :docs-client:eslint -x :docs-client:lint -x :docs-client:buildWeb -x :docs-client:copyWeb
22-
23-
# Find the built JAR
24-
CORE_JAR="core/build/libs/armeria-${VERSION}.jar"
25-
if [ ! -f "$CORE_JAR" ]; then
26-
echo "Error: Could not find armeria JAR at $CORE_JAR"
27-
exit 1
28-
fi
20+
# Build the core module (shaded JAR includes all dependencies)
21+
./gradlew :core:shadedJar -x javadoc -x :docs-client:nodeSetup -x :docs-client:npmSetup -x :docs-client:npmInstall -x :docs-client:eslint -x :docs-client:lint -x :docs-client:buildWeb -x :docs-client:copyWeb
2922

3023
# Download the original POM file
3124
curl -sL -o "armeria-${VERSION}.pom" "https://repo1.maven.org/maven2/com/linecorp/armeria/armeria/${VERSION}/armeria-${VERSION}.pom"
3225

3326
# Install core JAR to Maven local repository with POM
3427
mvn install:install-file -q \
35-
-Dfile="$CORE_JAR" \
28+
-Dfile="core/build/libs/armeria-untrimmed-${VERSION}.jar" \
3629
-DpomFile="armeria-${VERSION}.pom"
3730

3831
echo "armeria ${VERSION} built and installed (UNSAFE disabled)."
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Updating LMAX Disruptor version in opencensus-shim..."
5+
6+
# Add Java 11 compile target and disruptor version update to opencensus-shim build file
7+
cat >> opencensus-shim/build.gradle.kts << 'EOF'
8+
9+
tasks.withType<JavaCompile>().configureEach {
10+
options.release.set(11)
11+
}
12+
13+
configurations.all {
14+
resolutionStrategy.force("com.lmax:disruptor:4.0.0")
15+
}
16+
EOF
17+
18+
echo "LMAX Disruptor updated to version 4.0.0 with Java 11 compile target."

.github/workflows/unsafe.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
- name: Build custom armeria without unsafe
4646
run: ./.github/unsafe/build-custom-armeria.sh
4747

48+
- name: Update LMAX Disruptor version
49+
run: ./.github/unsafe/update-lmax-disruptor.sh
50+
4851
- name: Prioritize Maven local repository
4952
run: ./.github/unsafe/prioritize-maven-local.sh
5053

0 commit comments

Comments
 (0)