Skip to content

Commit

Permalink
Shadowed protobuf dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Gatis committed Oct 11, 2022
1 parent 1c22b20 commit b8ad8de
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: fatjars
path: spark-osmpbf/build/fatjars
path: spark-osmpbf/build/libs
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencyVersionGuava=26.0-jre
dependencyVersionJunit=4.12
dependencyVersionJmh=1.35
dependencyVersionOsmosis=0.48.3
dependencyVersionProtobuf=3.12.2
dependencyVersionProtobuf=3.20.1
dependencyVersionSpark=3.2.1

# Builds are signed if the settingsSigningEnabled property is set to true.
Expand Down
21 changes: 9 additions & 12 deletions spark-osmpbf/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'java'
id 'me.champeau.jmh' version '0.6.8'
}
Expand Down Expand Up @@ -26,20 +27,16 @@ dependencies {
configurations.implementation.extendsFrom(configurations.includeInJar)
}

task fatjar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveAppendix = 'fatjar'
destinationDirectory.set(file("$buildDir/fatjars"))
from {
configurations.includeInJar.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}

jmh {
jmhVersion = dependencyVersionJmh
}

shadowJar {
archiveAppendix = 'fatjar'
relocate('com.google.protobuf', 'io.github.igorgatis.spark.osmpbf.com.google.protobuf')
configurations = [project.configurations.includeInJar]
}

artifacts {
archives fatjar
}
archives shadowJar
}

0 comments on commit b8ad8de

Please sign in to comment.