aboutsummaryrefslogtreecommitdiff
path: root/spark-common
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2021-03-20 14:59:45 +0000
committerLuck <git@lucko.me>2021-03-20 14:59:45 +0000
commit8afbad26d965204b48df9da534fb931c16558887 (patch)
tree0ee17ed98c8bbfc7ab2c6681f668b081fda846d4 /spark-common
parent9c989affb9e11c1ac31537d09aa30f8bf06320e4 (diff)
downloadspark-8afbad26d965204b48df9da534fb931c16558887.tar.gz
spark-8afbad26d965204b48df9da534fb931c16558887.tar.bz2
spark-8afbad26d965204b48df9da534fb931c16558887.zip
Switch to protobuf lite
Quite a significant reduction in jar size, yay
Diffstat (limited to 'spark-common')
-rw-r--r--spark-common/build.gradle14
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java1
2 files changed, 13 insertions, 2 deletions
diff --git a/spark-common/build.gradle b/spark-common/build.gradle
index 7a69e86..ea4019d 100644
--- a/spark-common/build.gradle
+++ b/spark-common/build.gradle
@@ -5,12 +5,13 @@ plugins {
dependencies {
compile 'com.github.jvm-profiling-tools:async-profiler:v2.0'
compile 'org.ow2.asm:asm:7.1'
- compile 'com.google.protobuf:protobuf-java:3.14.0'
+ compile 'com.google.protobuf:protobuf-javalite:3.15.6'
compile 'com.squareup.okhttp3:okhttp:3.14.1'
compile 'com.squareup.okio:okio:1.17.3'
compile 'org.tukaani:xz:1.8'
compile('net.kyori:adventure-api:4.7.0') {
exclude(module: 'checker-qual')
+ exclude(module: 'annotations')
}
compile('net.kyori:adventure-text-serializer-gson:4.7.0') {
exclude(module: 'adventure-api')
@@ -34,7 +35,16 @@ processResources {
protobuf {
protoc {
- artifact = 'com.google.protobuf:protoc:3.14.0'
+ artifact = 'com.google.protobuf:protoc:3.15.6'
//path = '/opt/homebrew/bin/protoc' // required to support building on osx-aarch64
}
+ generateProtoTasks {
+ all().each { task ->
+ task.builtins {
+ java {
+ option 'lite'
+ }
+ }
+ }
+ }
}
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java
index 71ff425..50e97aa 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java
@@ -114,6 +114,7 @@ public final class AsyncProfilerAccess {
public boolean isSupported() {
if (this.setupException != null) {
System.out.println("[spark] async-profiler engine is not supported on your system: " + this.setupException.getMessage());
+ System.out.println("[spark] Please see here for more information: https://spark.lucko.me/docs/misc/Using-async-profiler");
}
return this.profiler != null;
}