Skip to content

Commit

Permalink
Remove shadow plugin to avoid resolution problems (fixes #716)
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed May 25, 2022
1 parent fa552a5 commit 86dd602
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -8,8 +8,9 @@ env:
ALLOWED_ENDPOINTS: >
1k4dacprodeus2file4.blob.core.windows.net:443
artifactcache.actions.githubusercontent.com:443
artifacts.codacy.com:433
artifacts.codacy.com:443
api.azul.com:443
api.codacy.com:443
api.github.com:443
caffeine.gradle-enterprise.cloud:443
cdn.azul.com:443
Expand All @@ -25,6 +26,7 @@ env:
guava.dev:443
lightbend.github.io:443
nodejs.org:443
objects.githubusercontent.com:443
oss.sonatype.org:443
pipelines.actions.githubusercontent.com:443
plugins.gradle.org:443
Expand Down Expand Up @@ -252,7 +254,7 @@ jobs:
- name: Harden Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
with:
egress-policy: audit
egress-policy: block
allowed-endpoints: ${{ env.ALLOWED_ENDPOINTS }}
- name: Checkout
uses: actions/checkout@v3
Expand Down
1 change: 0 additions & 1 deletion caffeine/build.gradle
Expand Up @@ -127,7 +127,6 @@ tasks.named('sourcesJar').configure {
dependsOn generateLocalCaches, generateNodes
}
tasks.javadoc.mustRunAfter(compileCodeGenJava)
tasks.shadowJar.mustRunAfter(compileCodeGenJava)

tasks.withType(Test).configureEach {
classpath += sourceSets.codeGen.runtimeClasspath
Expand Down
24 changes: 13 additions & 11 deletions gradle/coverage.gradle
Expand Up @@ -3,10 +3,7 @@
*/
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'jacoco'

allprojects {
apply plugin: 'org.sonarqube'
}
apply plugin: 'java'

def testReport = tasks.register('testReport', TestReport) {
group = 'Build'
Expand All @@ -33,14 +30,14 @@ subprojects {
// Only report code coverage for projects that are distributed
def coveredProjects = [ 'caffeine', 'guava', 'jcache' ].collect { project(it) }

tasks.register('jacocoFullReport', JacocoReport) {
def jacocoFullReport = tasks.register('jacocoFullReport', JacocoReport) {
group = 'Coverage reports'
description = 'Generates an aggregate report'

coveredProjects.each {
sourceSets it.sourceSets.main
mustRunAfter it.tasks.withType(Test)
executionData fileTree(rootDir.absolutePath).include("**/*${it.name}*/**/jacoco/*.exec")
coveredProjects.each { proj ->
sourceSets proj.sourceSets.main
mustRunAfter proj.tasks.withType(Test)
executionData fileTree(rootDir.absolutePath).include("**/*${proj.name}*/**/jacoco/*.exec")
}

reports {
Expand All @@ -62,6 +59,13 @@ tasks.named('coveralls').configure {
onlyIf { System.env.'CI' }
}

allprojects {
apply plugin: 'org.sonarqube'

rootProject.tasks.sonarqube.dependsOn(jacocoFullReport)
rootProject.tasks.sonarqube.dependsOn(tasks.processResources)
}

sonarqube {
properties {
property 'sonar.organization', 'caffeine'
Expand All @@ -72,5 +76,3 @@ sonarqube {
"${buildDir}/reports/jacoco/jacocoFullReport/jacocoFullReport.xml"
}
}

tasks.sonarqube.dependsOn(jacocoFullReport)
2 changes: 0 additions & 2 deletions gradle/dependencies.gradle
Expand Up @@ -98,7 +98,6 @@ ext {
nullaway: '1.3.0',
pmd: '6.45.0',
semanticVersioning: '1.1.0',
shadow: '7.1.2',
snyke: '0.4',
sonarqube: '3.3',
spotbugs: '4.7.0',
Expand Down Expand Up @@ -222,7 +221,6 @@ ext {
nullaway: "net.ltgt.gradle:gradle-nullaway-plugin:${pluginVersions.nullaway}",
pmd: "net.sourceforge.pmd:pmd:${pluginVersions.pmd}",
semanticVersioning: "io.ehdev:gradle-semantic-versioning:${pluginVersions.semanticVersioning}",
shadow: "gradle.plugin.com.github.johnrengelman:shadow:${pluginVersions.shadow}",
snyke: "gradle.plugin.io.snyk.gradle.plugin:snyk:${pluginVersions.snyke}",
sonarqube: "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${pluginVersions.sonarqube}",
spotbugs: "com.github.spotbugs:spotbugs:${pluginVersions.spotbugs}",
Expand Down
5 changes: 0 additions & 5 deletions gradle/jmh.gradle
Expand Up @@ -3,7 +3,6 @@
*/
import org.gradle.plugins.ide.eclipse.model.Library

apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'io.morethan.jmhreport'
apply plugin: 'me.champeau.jmh'

Expand Down Expand Up @@ -33,10 +32,6 @@ tasks.named('jmh').configure {
description = 'Executes a Java microbenchmark'
}

jmhJar {
mergeServiceFiles()
}

jmh {
jmhVersion = versions.jmh

Expand Down

0 comments on commit 86dd602

Please sign in to comment.