Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import de.undercouch.gradle.tasks.download.Download

plugins {
// https://plugins.gradle.org/plugin/com.gradleup.shadow
id 'com.gradleup.shadow' version '8.3.11'
id 'com.gradleup.shadow' version '9.4.1'
// https://plugins.gradle.org/plugin/de.undercouch.download
id 'de.undercouch.download' version '5.7.0'
id 'java'
Expand Down Expand Up @@ -992,6 +992,18 @@ subprojects {
minimize()
}

// Shadow 9.x registers a "shadowRuntimeElements" consumable variant for each project.
// When checker:runtimeClasspath resolves project dependencies (e.g. framework), Gradle may
// select shadowRuntimeElements, which points to the shadow JAR (framework-X-all.jar).
// That file does not exist unless framework:shadowJar has run, causing UnusedTracker to
// throw "neither file nor directory". Mark it non-consumable so Gradle always uses the
// standard runtimeElements variant (framework.jar) for inter-project resolution.
configurations.configureEach { Configuration c ->
if (c.name == 'shadowRuntimeElements') {
c.canBeConsumed = false
}
}

if (!project.name.startsWith('checker-qual-android')) {
task tags(type: Exec) {
description = 'Create Emacs TAGS table'
Expand Down
2 changes: 1 addition & 1 deletion checker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ final checkerPom(publication) {
publishing {
publications {
checker(MavenPublication) {
project.shadow.component it
from(components.shadow)
checkerPom it
artifact checkerJar
artifact allSourcesJar
Expand Down
5 changes: 1 addition & 4 deletions gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ apply plugin: 'maven-publish'
apply plugin: 'signing'

final isSnapshot = version.contains('SNAPSHOT')
// https://github.com/johnrengelman/shadow/issues/586#issuecomment-708375599
components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
skip()
}

publishing {
repositories {
maven {
Expand Down
Loading