scr
(Sheridan C Rawlins)
May 15, 2017, 10:49pm
1
In order to disable consistency checking, what was essentially a one-line override to set the componentId to the expected in the check rather than dying became about 150 lines of gross accessing of private variables and copy/paste of methods to create and use a subclassed MavenResolver instance.
PomfixMavenArtifactPlugin.groovy
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.repositories.MavenArtifactRepository
import org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler
import org.gradle.api.internal.artifacts.repositories.DefaultBaseRepositoryFactory
import org.gradle.util.ConfigureUtil
import java.lang.reflect.Field
/**
This file has been truncated. show original
PomfixMavenArtifactRepository.groovy
import org.gradle.api.InvalidUserDataException
import org.gradle.api.artifacts.repositories.AuthenticationContainer
import org.gradle.api.internal.artifacts.ImmutableModuleIdentifierFactory
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParser
import org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository
import org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver
import org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport
import org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransportFactory
import org.gradle.api.internal.file.FileResolver
import org.gradle.internal.component.external.model.ModuleComponentArtifactIdentifier
This file has been truncated. show original
PomfixMavenResolver.groovy
import groovy.util.logging.Slf4j
import org.gradle.api.artifacts.component.ModuleComponentIdentifier
import org.gradle.api.internal.artifacts.ImmutableModuleIdentifierFactory
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParser
import org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver
import org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport
import org.gradle.internal.component.external.model.ModuleComponentArtifactIdentifier
import org.gradle.internal.component.external.model.ModuleComponentArtifactMetadata
import org.gradle.internal.component.external.model.MutableMavenModuleResolveMetadata
This file has been truncated. show original
Is there anything the gradle.org folks could do to make this MUCH easier?
FWIW, yes, I’m trying to fix/upgrade the packages we depend on, but this is a necessary stop-gap until we can “herd the cats” to fix/rebuild packages.