Skip to content

Commit

Permalink
Move bundled guava build from top level to module level (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
lliangyu-lin authored Feb 13, 2025
1 parent 369f05b commit 19d87d6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 39 deletions.
39 changes: 0 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,42 +115,3 @@ subprojects {
testImplementation "org.apache.logging.log4j:log4j-core:2.23.1"
}
}

project(':trinitylake-bundled-guava') {
apply plugin: 'com.gradleup.shadow'

tasks.jar.dependsOn tasks.shadowJar

dependencies {
compileOnly(libs.guava.guava) {
exclude group: 'com.google.code.findbugs'
// may be LGPL - use ALv2 findbugs-annotations instead
exclude group: 'com.google.errorprone'
exclude group: 'com.google.j2objc'
}
}

shadowJar {
archiveClassifier.set(null)
configurations = [project.configurations.compileClasspath]
zip64 true

// include the LICENSE for the shaded Jar
from(projectDir) {
include 'LICENSE'
}

dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
exclude(dependency('org.checkerframework:checker-qual'))
}

relocate 'com.google.common', 'io.trinitylake.relocated.com.google.common'

minimize()
}

jar {
archiveClassifier.set('empty')
}
}
50 changes: 50 additions & 0 deletions bundled-guava/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'com.gradleup.shadow'

tasks.jar.dependsOn tasks.shadowJar

dependencies {
compileOnly(libs.guava.guava) {
exclude group: 'com.google.code.findbugs'
// may be LGPL - use ALv2 findbugs-annotations instead
exclude group: 'com.google.errorprone'
exclude group: 'com.google.j2objc'
}
}

shadowJar {
archiveClassifier.set(null)
configurations = [project.configurations.compileClasspath]
zip64 true

// include the LICENSE for the shaded Jar
from(projectDir) {
include 'LICENSE'
}

dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
exclude(dependency('org.checkerframework:checker-qual'))
}

relocate 'com.google.common', 'io.trinitylake.relocated.com.google.common'

minimize()
}

jar {
archiveClassifier.set('empty')
}

0 comments on commit 19d87d6

Please sign in to comment.