Skip to content

Commit

Permalink
#34 gradle 4.5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jk1 committed Jan 31, 2018
1 parent 1d83194 commit fbc09c7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ The plugin makes use of default artifact cache, downloading each dependency only
### Simple example

```groovy
// Gradle 4.3+
// Gradle 4.5+
plugins {
id 'com.github.jk1.tcdeps' version '0.17'
}
// Gradle 4.3-4.4
plugins {
id 'com.github.jk1.tcdeps' version '0.16'
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins{

group = 'com.github.jk1'
description = 'TeamCity dependencies plugin resolves project dependencies via local TeamCity server'
version = '0.16'
version = '0.17'
sourceCompatibility = 1.6
targetCompatibility = 1.6

Expand All @@ -31,7 +31,7 @@ dependencies {
}

// compilation ordering modified to allow joint compilation for both Kotlin and Groovy
compileGroovy.dependsOn = compileGroovy.taskDependencies.values - 'compileJava'
compileGroovy.dependsOn = compileGroovy.taskDependencies.getMutableValues() - 'compileJava'
compileKotlin.dependsOn compileGroovy
compileKotlin.classpath += files(compileGroovy.destinationDir)
classes.dependsOn compileKotlin
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.gradle.api.internal.artifacts.DefaultImmutableModuleIdentifierFactory
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.DisconnectedDescriptorParseContext
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.IvyModuleDescriptorConverter
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.IvyXmlModuleDescriptorParser
import org.gradle.api.internal.artifacts.repositories.metadata.IvyMutableModuleMetadataFactory
import org.gradle.internal.component.external.descriptor.Artifact
import org.gradle.internal.resource.local.FileResourceRepository
import org.gradle.ivy.IvyDescriptorArtifact
Expand Down Expand Up @@ -107,7 +108,8 @@ class ArtifactRegexResolver {
project.logger.debug("Parsing ivy file [$ivyFile]")
def factory = new DefaultImmutableModuleIdentifierFactory()
def fileRepository = ((GradleInternal) project.getGradle()).getServices().get(FileResourceRepository.class)
new IvyXmlModuleDescriptorParser(new IvyModuleDescriptorConverter(factory), factory, fileRepository)
def metadataFactory = ((GradleInternal) project.getGradle()).getServices().get(IvyMutableModuleMetadataFactory.class)
new IvyXmlModuleDescriptorParser(new IvyModuleDescriptorConverter(factory), factory, fileRepository, metadataFactory)
.parseMetaData(new DisconnectedDescriptorParseContext(), ivyFile)
.artifactDefinitions.toSet()
}
Expand Down

0 comments on commit fbc09c7

Please sign in to comment.