mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-12 07:50:53 -05:00
WIP
This commit is contained in:
@@ -2,6 +2,9 @@ package org.nixos.gradle2nix
|
|||||||
|
|
||||||
import org.gradle.tooling.GradleConnector
|
import org.gradle.tooling.GradleConnector
|
||||||
import org.gradle.tooling.ProjectConnection
|
import org.gradle.tooling.ProjectConnection
|
||||||
|
import org.nixos.gradle2nix.model.PARAM_INCLUDE_CONFIGURATIONS
|
||||||
|
import org.nixos.gradle2nix.model.PARAM_INCLUDE_PROJECTS
|
||||||
|
import org.nixos.gradle2nix.model.RESOLVE_ALL_TASK
|
||||||
|
|
||||||
fun connect(config: Config): ProjectConnection =
|
fun connect(config: Config): ProjectConnection =
|
||||||
GradleConnector.newConnector()
|
GradleConnector.newConnector()
|
||||||
@@ -28,19 +31,23 @@ fun ProjectConnection.build(
|
|||||||
}
|
}
|
||||||
addArguments(config.gradleArgs)
|
addArguments(config.gradleArgs)
|
||||||
addArguments(
|
addArguments(
|
||||||
|
"--gradle-user-home=${config.gradleHome}",
|
||||||
"--init-script=${config.appHome}/init.gradle",
|
"--init-script=${config.appHome}/init.gradle",
|
||||||
"--write-verification-metadata", "sha256"
|
"--write-verification-metadata", "sha256"
|
||||||
)
|
)
|
||||||
if (config.projectFilter != null) {
|
if (config.projectFilter != null) {
|
||||||
addArguments("-D${PARAM_INCLUDE_PROJECTS}")
|
addArguments("-D$PARAM_INCLUDE_PROJECTS")
|
||||||
}
|
}
|
||||||
if (config.configurationFilter != null) {
|
if (config.configurationFilter != null) {
|
||||||
addArguments("-D${PARAM_INCLUDE_CONFIGURATIONS}")
|
addArguments("-D$PARAM_INCLUDE_CONFIGURATIONS")
|
||||||
}
|
}
|
||||||
if (config.logger.verbose) {
|
if (config.logger.verbose) {
|
||||||
setStandardOutput(System.err)
|
setStandardOutput(System.err)
|
||||||
setStandardError(System.err)
|
setStandardError(System.err)
|
||||||
}
|
}
|
||||||
|
if (config.logger.stacktrace) {
|
||||||
|
addArguments("--stacktrace")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.run()
|
.run()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,8 @@ class Gradle2Nix : CliktCommand(
|
|||||||
if (appHome == null) {
|
if (appHome == null) {
|
||||||
System.err.println("Error: could not locate the /share directory in the gradle2nix installation")
|
System.err.println("Error: could not locate the /share directory in the gradle2nix installation")
|
||||||
}
|
}
|
||||||
val gradleHome = System.getenv("GRADLE_USER_HOME")?.let(::File) ?: File("${System.getProperty("user.home")}/.gradle")
|
val gradleHome =
|
||||||
|
System.getenv("GRADLE_USER_HOME")?.let(::File) ?: File("${System.getProperty("user.home")}/.gradle")
|
||||||
val logger = Logger(verbose = !quiet, stacktrace = debug)
|
val logger = Logger(verbose = !quiet, stacktrace = debug)
|
||||||
|
|
||||||
val config = Config(
|
val config = Config(
|
||||||
@@ -152,7 +153,7 @@ class Gradle2Nix : CliktCommand(
|
|||||||
val env = try {
|
val env = try {
|
||||||
processDependencies(config)
|
processDependencies(config)
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
logger.error("Dependency parsing failed", e)
|
logger.error("dependency parsing failed", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
val outDir = outDir ?: projectDir
|
val outDir = outDir ?: projectDir
|
||||||
|
|||||||
@@ -14,9 +14,8 @@ import okio.HashingSource
|
|||||||
import okio.blackholeSink
|
import okio.blackholeSink
|
||||||
import okio.buffer
|
import okio.buffer
|
||||||
import okio.source
|
import okio.source
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.Repository
|
import org.nixos.gradle2nix.model.Repository
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration
|
import org.nixos.gradle2nix.model.ResolvedConfiguration
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.ResolvedDependency
|
|
||||||
import org.nixos.gradle2nix.env.ArtifactFile
|
import org.nixos.gradle2nix.env.ArtifactFile
|
||||||
import org.nixos.gradle2nix.env.ArtifactSet
|
import org.nixos.gradle2nix.env.ArtifactSet
|
||||||
import org.nixos.gradle2nix.env.Env
|
import org.nixos.gradle2nix.env.Env
|
||||||
@@ -49,6 +48,8 @@ fun processDependencies(config: Config): Env {
|
|||||||
ModuleVersionId(ModuleId(it.group, it.name), it.version)
|
ModuleVersionId(ModuleId(it.group, it.name), it.version)
|
||||||
} ?: emptyMap()
|
} ?: emptyMap()
|
||||||
val moduleCache = mutableMapOf<ModuleVersionId, GradleModule?>()
|
val moduleCache = mutableMapOf<ModuleVersionId, GradleModule?>()
|
||||||
|
val pomCache = mutableMapOf<ModuleVersionId, Pair<String, ArtifactFile>?>()
|
||||||
|
val ivyCache = mutableMapOf<ModuleVersionId, Pair<String, ArtifactFile>?>()
|
||||||
val configurations = readDependencyGraph(config)
|
val configurations = readDependencyGraph(config)
|
||||||
|
|
||||||
val repositories = configurations
|
val repositories = configurations
|
||||||
@@ -64,11 +65,11 @@ fun processDependencies(config: Config): Env {
|
|||||||
}
|
}
|
||||||
if (repositories.isEmpty()) {
|
if (repositories.isEmpty()) {
|
||||||
config.logger.warn("no repositories found in any configuration")
|
config.logger.warn("no repositories found in any configuration")
|
||||||
return Env(emptyMap())
|
return emptyMap()
|
||||||
}
|
}
|
||||||
config.logger.debug("Repositories:\n ${repositories.values.joinToString("\n ")}")
|
config.logger.debug("Repositories:\n ${repositories.values.joinToString("\n ")}")
|
||||||
|
|
||||||
val modules = configurations.asSequence()
|
return configurations.asSequence()
|
||||||
.flatMap { it.allDependencies.asSequence() }
|
.flatMap { it.allDependencies.asSequence() }
|
||||||
.filterNot { it.id.startsWith("project ") || it.repository == null || it.repository !in repositories }
|
.filterNot { it.id.startsWith("project ") || it.repository == null || it.repository !in repositories }
|
||||||
.groupBy { ModuleId(it.coordinates.group, it.coordinates.module) }
|
.groupBy { ModuleId(it.coordinates.group, it.coordinates.module) }
|
||||||
@@ -83,34 +84,40 @@ fun processDependencies(config: Config): Env {
|
|||||||
val component = verificationComponents[componentId]
|
val component = verificationComponents[componentId]
|
||||||
?: verifyComponentFilesInCache(config, componentId)
|
?: verifyComponentFilesInCache(config, componentId)
|
||||||
?: verifyComponentFilesInTestRepository(config, componentId)
|
?: verifyComponentFilesInTestRepository(config, componentId)
|
||||||
|
?: config.logger.error("$componentId: no dependency metadata found")
|
||||||
|
|
||||||
val gradleModule = moduleCache.getOrPut(componentId) {
|
val gradleModule = moduleCache.getOrPut(componentId) {
|
||||||
maybeGetGradleModule(config.logger, componentId, dep.repositories)
|
maybeDownloadGradleModule(config.logger, component, dep.repositories)?.artifact?.second
|
||||||
}
|
}
|
||||||
ArtifactSet(
|
val pomArtifact = pomCache.getOrPut(componentId) {
|
||||||
needsPomRedirect = repositories.values.any {
|
maybeDownloadMavenPom(config.logger, component, dep.repositories, gradleModule)
|
||||||
"mavenPom" in it.metadataSources &&
|
}
|
||||||
"ignoreGradleMetadataRedirection" !in it.metadataSources
|
val ivyArtifact = ivyCache.getOrPut(componentId) {
|
||||||
},
|
maybeDownloadIvyDescriptor(config.logger, component, dep.repositories, gradleModule)
|
||||||
needsIvyRedirect = repositories.values.any {
|
}
|
||||||
"ivyDescriptor" in it.metadataSources &&
|
|
||||||
"ignoreGradleMetadataRedirection" !in it.metadataSources
|
val files = buildMap {
|
||||||
},
|
if (pomArtifact != null) put(pomArtifact.first, pomArtifact.second)
|
||||||
files = (component?.artifacts ?: emptyList()).associate { meta ->
|
if (ivyArtifact != null) put(ivyArtifact.first, ivyArtifact.second)
|
||||||
meta.name to ArtifactFile(
|
for (artifact in component.artifacts) {
|
||||||
urls = dep.repositories
|
put(
|
||||||
.flatMap { repository -> artifactUrls(componentId, meta.name, repository, gradleModule) }
|
artifact.name,
|
||||||
.distinct(),
|
ArtifactFile(
|
||||||
hash = meta.checksums.first().toSri()
|
urls = dep.repositories.flatMap { repo ->
|
||||||
|
artifactUrls(componentId, artifact.name, repo, gradleModule)
|
||||||
|
}.distinct(),
|
||||||
|
hash = artifact.checksums.first().toSri()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}.toSortedMap()
|
}
|
||||||
)
|
}.toSortedMap()
|
||||||
|
|
||||||
|
ArtifactSet(files)
|
||||||
}
|
}
|
||||||
.toSortedMap(Version.Comparator.reversed())
|
.toSortedMap(Version.Comparator.reversed())
|
||||||
Module(versions)
|
Module(versions)
|
||||||
}
|
}
|
||||||
.toSortedMap(compareBy(ModuleId::toString))
|
.toSortedMap(compareBy(ModuleId::toString))
|
||||||
|
|
||||||
return Env(modules)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun readVerificationMetadata(config: Config): VerificationMetadata? {
|
private fun readVerificationMetadata(config: Config): VerificationMetadata? {
|
||||||
@@ -162,25 +169,87 @@ private fun verifyComponentFilesInTestRepository(
|
|||||||
return Component(id, verifications.toList())
|
return Component(id, verifications.toList())
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
private fun maybeDownloadGradleModule(
|
||||||
private fun maybeGetGradleModule(logger: Logger, id: ModuleVersionId, repos: List<Repository>): GradleModule? {
|
logger: Logger,
|
||||||
val filename = with(id) { "$name-$version.module" }
|
component: Component,
|
||||||
val reposWithGradleMetadata = repos
|
repos: List<Repository>
|
||||||
.filter { "gradleMetadata" in it.metadataSources }
|
): ArtifactDownload<Pair<String, GradleModule>>? {
|
||||||
.flatMap { artifactUrls(id, filename, it, null)}
|
if (component.artifacts.none { it.name.endsWith(".module") }) return null
|
||||||
|
val filename = with(component.id) { "$name-$version.module" }
|
||||||
for (url in reposWithGradleMetadata) {
|
return maybeDownloadArtifact(logger, component.id, filename, repos)?.let { artifact ->
|
||||||
try {
|
try {
|
||||||
return URL(url).openStream().buffered().use { input ->
|
ArtifactDownload(
|
||||||
JsonFormat.decodeFromStream(input)
|
filename to JsonFormat.decodeFromString<GradleModule>(artifact.artifact),
|
||||||
}
|
artifact.url,
|
||||||
|
artifact.hash
|
||||||
|
)
|
||||||
} catch (e: SerializationException) {
|
} catch (e: SerializationException) {
|
||||||
logger.error("$id: failed to parse Gradle module metadata ($url)", e)
|
logger.warn("${component.id}: failed to parse Gradle module metadata from ${artifact.url}")
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun maybeDownloadMavenPom(
|
||||||
|
logger: Logger,
|
||||||
|
component: Component,
|
||||||
|
repos: List<Repository>,
|
||||||
|
gradleModule: GradleModule?
|
||||||
|
): Pair<String, ArtifactFile>? {
|
||||||
|
if (component.artifacts.any { it.name.endsWith(".pom") }) return null
|
||||||
|
val pomRepos = repos.filter { "mavenPom" in it.metadataSources }
|
||||||
|
if (pomRepos.isEmpty()) return null
|
||||||
|
val filename = with(component.id) { "$name-$version.pom" }
|
||||||
|
|
||||||
|
return maybeDownloadArtifact(logger, component.id, filename, pomRepos)?.let { artifact ->
|
||||||
|
filename to ArtifactFile(
|
||||||
|
urls = pomRepos.flatMap { repo ->
|
||||||
|
artifactUrls(component.id, filename, repo, gradleModule)
|
||||||
|
}.distinct(),
|
||||||
|
hash = artifact.hash.toSri()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun maybeDownloadIvyDescriptor(
|
||||||
|
logger: Logger,
|
||||||
|
component: Component,
|
||||||
|
repos: List<Repository>,
|
||||||
|
gradleModule: GradleModule?
|
||||||
|
): Pair<String, ArtifactFile>? {
|
||||||
|
if (component.artifacts.any { it.name == "ivy.xml" }) return null
|
||||||
|
val ivyRepos = repos.filter { "ivyDescriptor" in it.metadataSources }
|
||||||
|
if (ivyRepos.isEmpty()) return null
|
||||||
|
return maybeDownloadArtifact(logger, component.id, "ivy.xml", ivyRepos)?.let { artifact ->
|
||||||
|
"ivy.xml" to ArtifactFile(
|
||||||
|
urls = ivyRepos.flatMap { repo ->
|
||||||
|
artifactUrls(component.id, "ivy.xml", repo, gradleModule)
|
||||||
|
}.distinct(),
|
||||||
|
hash = artifact.hash.toSri()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun maybeDownloadArtifact(
|
||||||
|
logger: Logger,
|
||||||
|
id: ModuleVersionId,
|
||||||
|
filename: String,
|
||||||
|
repos: List<Repository>
|
||||||
|
): ArtifactDownload<String>? {
|
||||||
|
val urls = repos.flatMap { artifactUrls(id, filename, it, null)}
|
||||||
|
|
||||||
|
for (url in urls) {
|
||||||
|
try {
|
||||||
|
val source = HashingSource.sha256(URL(url).openStream().source())
|
||||||
|
val text = source.buffer().readUtf8()
|
||||||
|
val hash = source.hash
|
||||||
|
return ArtifactDownload(text, url, Sha256(hash.hex()))
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
// Pass
|
// Pass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("artifact $filename not found in any repository")
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,3 +345,9 @@ private data class MergedDependency(
|
|||||||
val id: ModuleVersionId,
|
val id: ModuleVersionId,
|
||||||
val repositories: List<Repository>
|
val repositories: List<Repository>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private data class ArtifactDownload<T>(
|
||||||
|
val artifact: T,
|
||||||
|
val url: String,
|
||||||
|
val hash: Checksum
|
||||||
|
)
|
||||||
|
|||||||
@@ -12,11 +12,7 @@ import kotlinx.serialization.encoding.Encoder
|
|||||||
import org.gradle.internal.impldep.com.google.common.collect.ImmutableMap
|
import org.gradle.internal.impldep.com.google.common.collect.ImmutableMap
|
||||||
import org.gradle.internal.impldep.com.google.common.primitives.Longs
|
import org.gradle.internal.impldep.com.google.common.primitives.Longs
|
||||||
|
|
||||||
@Serializable
|
typealias Env = Map<ModuleId, Module>
|
||||||
@JvmInline
|
|
||||||
value class Env(
|
|
||||||
val modules: Map<ModuleId, Module>,
|
|
||||||
)
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@JvmInline
|
@JvmInline
|
||||||
@@ -25,23 +21,30 @@ value class Module(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ArtifactSet(
|
@JvmInline
|
||||||
val needsPomRedirect: Boolean,
|
value class ArtifactSet(
|
||||||
val needsIvyRedirect: Boolean,
|
|
||||||
val files: Map<String, ArtifactFile>
|
val files: Map<String, ArtifactFile>
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ArtifactFile(
|
data class ArtifactFile internal constructor(
|
||||||
val urls: List<String>,
|
val urls: List<String>,
|
||||||
val hash: String,
|
val hash: String,
|
||||||
)
|
) {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
operator fun invoke(urls: List<String>, hash: String) = ArtifactFile(urls.sorted(), hash)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Serializable(ModuleId.Serializer::class)
|
@Serializable(ModuleId.Serializer::class)
|
||||||
data class ModuleId(
|
data class ModuleId(
|
||||||
val group: String,
|
val group: String,
|
||||||
val name: String,
|
val name: String,
|
||||||
) {
|
) : Comparable<ModuleId> {
|
||||||
|
|
||||||
|
override fun compareTo(other: ModuleId): Int =
|
||||||
|
compareValuesBy(this, other, ModuleId::group, ModuleId::name)
|
||||||
|
|
||||||
override fun toString(): String = "$group:$name"
|
override fun toString(): String = "$group:$name"
|
||||||
|
|
||||||
@@ -52,7 +55,7 @@ data class ModuleId(
|
|||||||
)
|
)
|
||||||
|
|
||||||
override fun serialize(encoder: Encoder, value: ModuleId) {
|
override fun serialize(encoder: Encoder, value: ModuleId) {
|
||||||
encoder.encodeString("${value.name}:${value.group}")
|
encoder.encodeString(value.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun deserialize(decoder: Decoder): ModuleId {
|
override fun deserialize(decoder: Decoder): ModuleId {
|
||||||
@@ -66,20 +69,55 @@ data class ModuleId(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Serializable(ModuleVersionId.Serializer::class)
|
||||||
data class ModuleVersionId(
|
data class ModuleVersionId(
|
||||||
val moduleId: ModuleId,
|
val moduleId: ModuleId,
|
||||||
val version: Version
|
val version: Version
|
||||||
) {
|
) : Comparable<ModuleVersionId> {
|
||||||
|
constructor(group: String, name: String, version: Version) : this(ModuleId(group, name), version)
|
||||||
|
|
||||||
val group: String get() = moduleId.group
|
val group: String get() = moduleId.group
|
||||||
val name: String get() = moduleId.name
|
val name: String get() = moduleId.name
|
||||||
|
|
||||||
override fun toString(): String = "$moduleId:$version"
|
override fun compareTo(other: ModuleVersionId): Int =
|
||||||
|
compareValuesBy(
|
||||||
|
this,
|
||||||
|
other,
|
||||||
|
ModuleVersionId::moduleId,
|
||||||
|
ModuleVersionId::version
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
override fun toString(): String = "$group:$name:$version"
|
||||||
|
|
||||||
|
internal object Serializer : KSerializer<ModuleVersionId> {
|
||||||
|
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(
|
||||||
|
Version::class.qualifiedName!!,
|
||||||
|
PrimitiveKind.STRING
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun serialize(encoder: Encoder, value: ModuleVersionId) {
|
||||||
|
encoder.encodeString(value.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun deserialize(decoder: Decoder): ModuleVersionId {
|
||||||
|
val encoded = decoder.decodeString()
|
||||||
|
val parts = encoded.split(":")
|
||||||
|
if (parts.size != 3 || parts.any(String::isBlank)) {
|
||||||
|
throw SerializationException("invalid module version id: $encoded")
|
||||||
|
}
|
||||||
|
return ModuleVersionId(
|
||||||
|
moduleId = ModuleId(parts[0], parts[1]),
|
||||||
|
version = Version(parts[3])
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(Version.Serializer::class)
|
@Serializable(Version.Serializer::class)
|
||||||
class Version(val source: String, val parts: List<String>, base: Version?) : Comparable<Version> {
|
class Version(val source: String, val parts: List<String>, base: Version?) : Comparable<Version> {
|
||||||
|
|
||||||
val base: Version
|
private val base: Version
|
||||||
val numericParts: List<Long?>
|
val numericParts: List<Long?>
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ package org.nixos.gradle2nix.metadata
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import nl.adaptivity.xmlutil.XmlStreaming
|
|
||||||
import nl.adaptivity.xmlutil.serialization.XML
|
import nl.adaptivity.xmlutil.serialization.XML
|
||||||
import nl.adaptivity.xmlutil.serialization.XmlChildrenName
|
import nl.adaptivity.xmlutil.serialization.XmlChildrenName
|
||||||
import nl.adaptivity.xmlutil.serialization.XmlElement
|
import nl.adaptivity.xmlutil.serialization.XmlElement
|
||||||
import nl.adaptivity.xmlutil.serialization.XmlSerialName
|
import nl.adaptivity.xmlutil.serialization.XmlSerialName
|
||||||
|
import nl.adaptivity.xmlutil.xmlStreaming
|
||||||
import org.nixos.gradle2nix.Logger
|
import org.nixos.gradle2nix.Logger
|
||||||
import org.nixos.gradle2nix.DependencyCoordinates
|
|
||||||
import org.nixos.gradle2nix.env.ModuleVersionId
|
import org.nixos.gradle2nix.env.ModuleVersionId
|
||||||
import org.nixos.gradle2nix.env.Version
|
import org.nixos.gradle2nix.env.Version
|
||||||
|
|
||||||
@@ -108,6 +107,8 @@ data class Component(
|
|||||||
val version: Version,
|
val version: Version,
|
||||||
val artifacts: List<Artifact> = emptyList(),
|
val artifacts: List<Artifact> = emptyList(),
|
||||||
) {
|
) {
|
||||||
|
val id: ModuleVersionId get() = ModuleVersionId(group, name, version)
|
||||||
|
|
||||||
constructor(id: ModuleVersionId, artifacts: List<Artifact>) : this(
|
constructor(id: ModuleVersionId, artifacts: List<Artifact>) : this(
|
||||||
id.group,
|
id.group,
|
||||||
id.name,
|
id.name,
|
||||||
@@ -134,7 +135,7 @@ val XmlFormat = XML {
|
|||||||
|
|
||||||
fun parseVerificationMetadata(logger: Logger, metadata: File): VerificationMetadata? {
|
fun parseVerificationMetadata(logger: Logger, metadata: File): VerificationMetadata? {
|
||||||
return try {
|
return try {
|
||||||
metadata.reader().buffered().let(XmlStreaming::newReader).use { input ->
|
metadata.reader().buffered().let(xmlStreaming::newReader).use { input ->
|
||||||
XmlFormat.decodeFromReader(input)
|
XmlFormat.decodeFromReader(input)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ class GoldenTest : FunSpec({
|
|||||||
golden("dependency/snapshot-dynamic")
|
golden("dependency/snapshot-dynamic")
|
||||||
golden("dependency/snapshot-redirect")
|
golden("dependency/snapshot-redirect")
|
||||||
}
|
}
|
||||||
|
context("included-build") {
|
||||||
|
golden("included-build")
|
||||||
|
}
|
||||||
context("integration") {
|
context("integration") {
|
||||||
golden("integration/settings-buildscript")
|
golden("integration/settings-buildscript")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ suspend fun TestScope.fixture(
|
|||||||
if (!tempDir.resolve("settings.gradle").exists() && !tempDir.resolve("settings.gradle.kts").exists()) {
|
if (!tempDir.resolve("settings.gradle").exists() && !tempDir.resolve("settings.gradle.kts").exists()) {
|
||||||
Files.createFile(tempDir.resolve("settings.gradle").toPath())
|
Files.createFile(tempDir.resolve("settings.gradle").toPath())
|
||||||
}
|
}
|
||||||
app.main(listOf("-d", tempDir.toString()) + args.withM2())
|
app.main(listOf("-d", tempDir.toString()) + listOf("--debug") + args.withM2() + "-Dorg.gradle.internal.operations.trace=${tempDir.resolve("build").absolutePath}")
|
||||||
val file = tempDir.resolve("${app.envFile}.json")
|
val file = tempDir.resolve("${app.envFile}.json")
|
||||||
file.shouldBeAFile()
|
file.shouldBeAFile()
|
||||||
val env: Env = file.inputStream().buffered().use { input ->
|
val env: Env = file.inputStream().buffered().use { input ->
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ subprojects {
|
|||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
wrapper {
|
wrapper {
|
||||||
gradleVersion = "8.3"
|
gradleVersion = libs.versions.gradle.get()
|
||||||
distributionType = Wrapper.DistributionType.ALL
|
distributionType = Wrapper.DistributionType.ALL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,4 +35,7 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
in gradle2nix
|
in buildGradle {
|
||||||
|
envSpec = ./gradle-env.json;
|
||||||
|
pname = "gradle2nix";
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,3 +9,12 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.gradle.publish:plugin-publish-plugin:1.2.1")
|
implementation("com.gradle.publish:plugin-publish-plugin:1.2.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gradlePlugin {
|
||||||
|
plugins {
|
||||||
|
register("apply-plugin-publish") {
|
||||||
|
id = "com.example.apply-plugin-publish"
|
||||||
|
implementationClass = "com.example.ApplyPluginPublishPlugin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.example
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id("com.gradle.plugin-publish")
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.example
|
||||||
|
|
||||||
|
import org.gradle.api.Plugin
|
||||||
|
import org.gradle.api.Project
|
||||||
|
|
||||||
|
open class ApplyPluginPublishPlugin : Plugin<Project> {
|
||||||
|
override fun apply(project: Project) {
|
||||||
|
project.pluginManager.apply("com.gradle.plugin-publish")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,101 +1,81 @@
|
|||||||
{
|
{
|
||||||
"com.squareup.moshi:moshi": {
|
"com.squareup.moshi:moshi": {
|
||||||
"1.8.0": {
|
"1.8.0": {
|
||||||
"needsPomRedirect": true,
|
"moshi-1.8.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
||||||
"moshi-1.8.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
},
|
||||||
],
|
"moshi-1.8.0.pom": {
|
||||||
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
||||||
"moshi-1.8.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.squareup.okio:okio": {
|
"com.squareup.okio:okio": {
|
||||||
"2.2.2": {
|
"2.2.2": {
|
||||||
"needsPomRedirect": true,
|
"okio-2.2.2.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
||||||
"okio-2.2.2.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
},
|
||||||
],
|
"okio-2.2.2.pom": {
|
||||||
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
||||||
"okio-2.2.2.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib": {
|
"org.jetbrains.kotlin:kotlin-stdlib": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
||||||
"kotlin-stdlib-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-1.2.60.pom": {
|
||||||
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
||||||
"kotlin-stdlib-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-common-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
||||||
"kotlin-stdlib-common-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-common-1.2.60.pom": {
|
||||||
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
||||||
"kotlin-stdlib-common-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains:annotations": {
|
"org.jetbrains:annotations": {
|
||||||
"13.0": {
|
"13.0": {
|
||||||
"needsPomRedirect": true,
|
"annotations-13.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
||||||
"annotations-13.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
},
|
||||||
],
|
"annotations-13.0.pom": {
|
||||||
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
||||||
"annotations-13.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,101 +1,81 @@
|
|||||||
{
|
{
|
||||||
"com.squareup.moshi:moshi": {
|
"com.squareup.moshi:moshi": {
|
||||||
"1.8.0": {
|
"1.8.0": {
|
||||||
"needsPomRedirect": true,
|
"moshi-1.8.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
||||||
"moshi-1.8.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
},
|
||||||
],
|
"moshi-1.8.0.pom": {
|
||||||
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
||||||
"moshi-1.8.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.squareup.okio:okio": {
|
"com.squareup.okio:okio": {
|
||||||
"2.2.2": {
|
"2.2.2": {
|
||||||
"needsPomRedirect": true,
|
"okio-2.2.2.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
||||||
"okio-2.2.2.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
},
|
||||||
],
|
"okio-2.2.2.pom": {
|
||||||
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
||||||
"okio-2.2.2.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib": {
|
"org.jetbrains.kotlin:kotlin-stdlib": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
||||||
"kotlin-stdlib-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-1.2.60.pom": {
|
||||||
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
||||||
"kotlin-stdlib-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-common-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
||||||
"kotlin-stdlib-common-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-common-1.2.60.pom": {
|
||||||
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
||||||
"kotlin-stdlib-common-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains:annotations": {
|
"org.jetbrains:annotations": {
|
||||||
"13.0": {
|
"13.0": {
|
||||||
"needsPomRedirect": true,
|
"annotations-13.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
||||||
"annotations-13.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
},
|
||||||
],
|
"annotations-13.0.pom": {
|
||||||
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
||||||
"annotations-13.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,17 @@
|
|||||||
{
|
{
|
||||||
"com.badlogicgames.gdx:gdx-platform": {
|
"com.badlogicgames.gdx:gdx-platform": {
|
||||||
"1.9.9": {
|
"1.9.9": {
|
||||||
"needsPomRedirect": true,
|
"gdx-platform-1.9.9-natives-desktop.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar"
|
||||||
"gdx-platform-1.9.9-natives-desktop.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-e8c9VPpFH+LeJU6PgmCkOb/jutOxFnO6LPMaTxL2hU8="
|
||||||
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar"
|
},
|
||||||
],
|
"gdx-platform-1.9.9.pom": {
|
||||||
"hash": "sha256-e8c9VPpFH+LeJU6PgmCkOb/jutOxFnO6LPMaTxL2hU8="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9.pom"
|
||||||
"gdx-platform-1.9.9.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-SWnDZyJaErav4Z4sA+D1WA3U1aQOSR64sd8+cQzofSY="
|
||||||
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-SWnDZyJaErav4Z4sA+D1WA3U1aQOSR64sd8+cQzofSY="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
{
|
{
|
||||||
"com.badlogicgames.gdx:gdx-platform": {
|
"com.badlogicgames.gdx:gdx-platform": {
|
||||||
"1.9.9": {
|
"1.9.9": {
|
||||||
"needsPomRedirect": true,
|
"gdx-platform-1.9.9-natives-desktop.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar"
|
||||||
"gdx-platform-1.9.9-natives-desktop.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-e8c9VPpFH+LeJU6PgmCkOb/jutOxFnO6LPMaTxL2hU8="
|
||||||
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar"
|
},
|
||||||
],
|
"gdx-platform-1.9.9.pom": {
|
||||||
"hash": "sha256-e8c9VPpFH+LeJU6PgmCkOb/jutOxFnO6LPMaTxL2hU8="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9.pom"
|
||||||
"gdx-platform-1.9.9.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-SWnDZyJaErav4Z4sA+D1WA3U1aQOSR64sd8+cQzofSY="
|
||||||
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-SWnDZyJaErav4Z4sA+D1WA3U1aQOSR64sd8+cQzofSY="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,55 +1,43 @@
|
|||||||
{
|
{
|
||||||
"io.micrometer:micrometer-bom": {
|
"io.micrometer:micrometer-bom": {
|
||||||
"1.5.1": {
|
"1.5.1": {
|
||||||
"needsPomRedirect": true,
|
"micrometer-bom-1.5.1.pom": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-bom/1.5.1/micrometer-bom-1.5.1.pom"
|
||||||
"micrometer-bom-1.5.1.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-K/qF6ds8ck5sWvelJBYk+w+K04oQpT/4BtY57WVLRUI="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-bom/1.5.1/micrometer-bom-1.5.1.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-K/qF6ds8ck5sWvelJBYk+w+K04oQpT/4BtY57WVLRUI="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"io.micrometer:micrometer-core": {
|
"io.micrometer:micrometer-core": {
|
||||||
"1.5.1": {
|
"1.5.1": {
|
||||||
"needsPomRedirect": true,
|
"micrometer-core-1.5.1.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-core/1.5.1/micrometer-core-1.5.1.jar"
|
||||||
"micrometer-core-1.5.1.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-DtgVYBDVGDBWMwSfeKC6O+fwqd+N2q4eTizJgQ1wfI8="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-core/1.5.1/micrometer-core-1.5.1.jar"
|
},
|
||||||
],
|
"micrometer-core-1.5.1.pom": {
|
||||||
"hash": "sha256-DtgVYBDVGDBWMwSfeKC6O+fwqd+N2q4eTizJgQ1wfI8="
|
"urls": [
|
||||||
},
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-core/1.5.1/micrometer-core-1.5.1.pom"
|
||||||
"micrometer-core-1.5.1.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-Cb4KaUHaOvdOz7VpDax6kJKuT2KWY5Ci73foX2xl6xw="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-core/1.5.1/micrometer-core-1.5.1.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-Cb4KaUHaOvdOz7VpDax6kJKuT2KWY5Ci73foX2xl6xw="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.hdrhistogram:HdrHistogram": {
|
"org.hdrhistogram:HdrHistogram": {
|
||||||
"2.1.12": {
|
"2.1.12": {
|
||||||
"needsPomRedirect": true,
|
"HdrHistogram-2.1.12.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar"
|
||||||
"HdrHistogram-2.1.12.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar"
|
},
|
||||||
],
|
"HdrHistogram-2.1.12.pom": {
|
||||||
"hash": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
|
"urls": [
|
||||||
},
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.pom"
|
||||||
"HdrHistogram-2.1.12.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-f7PnkMFU0bXiMXC7jL9/cO8ICa8XIp8dywENd5llEIA="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-f7PnkMFU0bXiMXC7jL9/cO8ICa8XIp8dywENd5llEIA="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
{
|
{
|
||||||
"org.apache:test-SNAPSHOT1": {
|
"org.apache:test-SNAPSHOT1": {
|
||||||
"2.0.2-SNAPSHOT": {
|
"2.0.2-SNAPSHOT": {
|
||||||
"needsPomRedirect": true,
|
"test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
],
|
||||||
"test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": {
|
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
||||||
"urls": [
|
},
|
||||||
],
|
"test-SNAPSHOT1-2.0.2-20070310.181613-3.pom": {
|
||||||
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
"urls": [
|
||||||
},
|
],
|
||||||
"test-SNAPSHOT1-2.0.2-20070310.181613-3.pom": {
|
"hash": "sha256-HkNYH8bwRqh0B760aORWKwMuDrO1E89Y8tx0esl66gs="
|
||||||
"urls": [
|
|
||||||
],
|
|
||||||
"hash": "sha256-HkNYH8bwRqh0B760aORWKwMuDrO1E89Y8tx0esl66gs="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
{
|
{
|
||||||
"org.apache:test-SNAPSHOT1": {
|
"org.apache:test-SNAPSHOT1": {
|
||||||
"2.0.2-SNAPSHOT": {
|
"2.0.2-SNAPSHOT": {
|
||||||
"needsPomRedirect": true,
|
"test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
],
|
||||||
"test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": {
|
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
||||||
"urls": [
|
},
|
||||||
],
|
"test-SNAPSHOT1-2.0.2-20070310.181613-3.pom": {
|
||||||
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
"urls": [
|
||||||
},
|
],
|
||||||
"test-SNAPSHOT1-2.0.2-20070310.181613-3.pom": {
|
"hash": "sha256-HkNYH8bwRqh0B760aORWKwMuDrO1E89Y8tx0esl66gs="
|
||||||
"urls": [
|
|
||||||
],
|
|
||||||
"hash": "sha256-HkNYH8bwRqh0B760aORWKwMuDrO1E89Y8tx0esl66gs="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
{
|
{
|
||||||
"com.github.anuken:packr": {
|
"com.github.anuken:packr": {
|
||||||
"-SNAPSHOT": {
|
"-SNAPSHOT": {
|
||||||
"needsPomRedirect": true,
|
"packr--SNAPSHOT.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.jar"
|
||||||
"packr--SNAPSHOT.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-XrfVZLc7efr2n3Bz6mOw8DkRI0T8rU8B/MKUMVDl71w="
|
||||||
"https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.jar"
|
},
|
||||||
],
|
"packr--SNAPSHOT.pom": {
|
||||||
"hash": "sha256-XrfVZLc7efr2n3Bz6mOw8DkRI0T8rU8B/MKUMVDl71w="
|
"urls": [
|
||||||
},
|
"https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.pom"
|
||||||
"packr--SNAPSHOT.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-xP28J7blX1IzuJxD4u/wy1ZbwAT5RAajBcpBWs1fAxU="
|
||||||
"https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-xP28J7blX1IzuJxD4u/wy1ZbwAT5RAajBcpBWs1fAxU="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
{
|
{
|
||||||
"org.apache:test-SNAPSHOT2": {
|
"org.apache:test-SNAPSHOT2": {
|
||||||
"2.0.2-SNAPSHOT": {
|
"2.0.2-SNAPSHOT": {
|
||||||
"needsPomRedirect": true,
|
"test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar"
|
||||||
"test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar"
|
},
|
||||||
],
|
"test-SNAPSHOT2-2.0.2-SNAPSHOT.pom": {
|
||||||
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
"urls": [
|
||||||
},
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.pom"
|
||||||
"test-SNAPSHOT2-2.0.2-SNAPSHOT.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-XCACfgVM2OthMcb9rU/nVQvjiJawqxOd5CSRmvql1O8="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-XCACfgVM2OthMcb9rU/nVQvjiJawqxOd5CSRmvql1O8="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
{
|
{
|
||||||
"org.apache:test-SNAPSHOT2": {
|
"org.apache:test-SNAPSHOT2": {
|
||||||
"2.0.2-SNAPSHOT": {
|
"2.0.2-SNAPSHOT": {
|
||||||
"needsPomRedirect": true,
|
"test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar"
|
||||||
"test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar"
|
},
|
||||||
],
|
"test-SNAPSHOT2-2.0.2-SNAPSHOT.pom": {
|
||||||
"hash": "sha256-a99mtb8qROZYvqLuhmlasVCgbmAL9nzVzOJFrVSWLGE="
|
"urls": [
|
||||||
},
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.pom"
|
||||||
"test-SNAPSHOT2-2.0.2-SNAPSHOT.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-XCACfgVM2OthMcb9rU/nVQvjiJawqxOd5CSRmvql1O8="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-XCACfgVM2OthMcb9rU/nVQvjiJawqxOd5CSRmvql1O8="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
48
fixtures/golden/included-build.groovy.json
Normal file
48
fixtures/golden/included-build.groovy.json
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"org.apache:foo": {
|
||||||
|
"2.0.0": {
|
||||||
|
"foo-2.0.0.jar": {
|
||||||
|
"urls": [
|
||||||
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/foo/2.0.0/foo-2.0.0.jar"
|
||||||
|
],
|
||||||
|
"hash": "sha256-M95zEuAwVCam7c2rKIET5qs4Q60sA84RyTA3a9jdQd8="
|
||||||
|
},
|
||||||
|
"foo-2.0.0.pom": {
|
||||||
|
"urls": [
|
||||||
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/foo/2.0.0/foo-2.0.0.pom"
|
||||||
|
],
|
||||||
|
"hash": "sha256-gcL/k4xoI5SK4qDNcyH1uHkgiGQv3WohPb45Gsb9gi8="
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"1.0.0": {
|
||||||
|
"foo-1.0.0.jar": {
|
||||||
|
"urls": [
|
||||||
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/foo/1.0.0/foo-1.0.0.jar"
|
||||||
|
],
|
||||||
|
"hash": "sha256-M95zEuAwVCam7c2rKIET5qs4Q60sA84RyTA3a9jdQd8="
|
||||||
|
},
|
||||||
|
"foo-1.0.0.pom": {
|
||||||
|
"urls": [
|
||||||
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/foo/1.0.0/foo-1.0.0.pom"
|
||||||
|
],
|
||||||
|
"hash": "sha256-roNL3MgAJuUPxIdJJiSpjU3yEFlJFDQ99QvnaWlkVcE="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"org.apache:test": {
|
||||||
|
"1.0.0": {
|
||||||
|
"test-1.0.0.jar": {
|
||||||
|
"urls": [
|
||||||
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar"
|
||||||
|
],
|
||||||
|
"hash": "sha256-M95zEuAwVCam7c2rKIET5qs4Q60sA84RyTA3a9jdQd8="
|
||||||
|
},
|
||||||
|
"test-1.0.0.pom": {
|
||||||
|
"urls": [
|
||||||
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"
|
||||||
|
],
|
||||||
|
"hash": "sha256-sYk8m4+T+hRJ+43tpPkthrE/JftrsMnmuzORCLCK1To="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,181 +1,145 @@
|
|||||||
{
|
{
|
||||||
"com.googlecode.javaewah:JavaEWAH": {
|
"com.googlecode.javaewah:JavaEWAH": {
|
||||||
"1.1.6": {
|
"1.1.6": {
|
||||||
"needsPomRedirect": true,
|
"JavaEWAH-1.1.6.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar"
|
||||||
"JavaEWAH-1.1.6.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-941EoeOHfxznSLSoXfUXHl6Omlw8b2O7kAPbb4TM6VI="
|
||||||
"https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar"
|
},
|
||||||
],
|
"JavaEWAH-1.1.6.pom": {
|
||||||
"hash": "sha256-941EoeOHfxznSLSoXfUXHl6Omlw8b2O7kAPbb4TM6VI="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.pom"
|
||||||
"JavaEWAH-1.1.6.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-f0/5GbHuF783duBYo/IOYXPbI6XkTPLRB+x1cMGGq/A="
|
||||||
"https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-f0/5GbHuF783duBYo/IOYXPbI6XkTPLRB+x1cMGGq/A="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.jcraft:jsch": {
|
"com.jcraft:jsch": {
|
||||||
"0.1.54": {
|
"0.1.54": {
|
||||||
"needsPomRedirect": true,
|
"jsch-0.1.54.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar"
|
||||||
"jsch-0.1.54.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-kusnOjMWdiR4/dT+A6DOGELFb0lsnBL+EjXbgEUOH9s="
|
||||||
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar"
|
},
|
||||||
],
|
"jsch-0.1.54.pom": {
|
||||||
"hash": "sha256-kusnOjMWdiR4/dT+A6DOGELFb0lsnBL+EjXbgEUOH9s="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.pom"
|
||||||
"jsch-0.1.54.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-q49RIDm+f2riDhjnQ7Sp2KIJWElEMZF9pYrlqu+KNHg="
|
||||||
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-q49RIDm+f2riDhjnQ7Sp2KIJWElEMZF9pYrlqu+KNHg="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"commons-codec:commons-codec": {
|
"commons-codec:commons-codec": {
|
||||||
"1.6": {
|
"1.6": {
|
||||||
"needsPomRedirect": true,
|
"commons-codec-1.6.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar"
|
||||||
"commons-codec-1.6.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-VLNOlBuOFBS9PkDXNu/TSBdy3CbbMpb2qkXOyfYgPYY="
|
||||||
"https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar"
|
},
|
||||||
],
|
"commons-codec-1.6.pom": {
|
||||||
"hash": "sha256-VLNOlBuOFBS9PkDXNu/TSBdy3CbbMpb2qkXOyfYgPYY="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.pom"
|
||||||
"commons-codec-1.6.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-oG410//zprgT2UiU6/PkmPlUDIZMWzmueDkH46bHKIk="
|
||||||
"https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-oG410//zprgT2UiU6/PkmPlUDIZMWzmueDkH46bHKIk="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"commons-logging:commons-logging": {
|
"commons-logging:commons-logging": {
|
||||||
"1.1.3": {
|
"1.1.3": {
|
||||||
"needsPomRedirect": true,
|
"commons-logging-1.1.3.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar"
|
||||||
"commons-logging-1.1.3.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-cJA/b8gumQjI2p8gRD9h2Q8IcKMSZCmR/oRioLk5F4Q="
|
||||||
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar"
|
},
|
||||||
],
|
"commons-logging-1.1.3.pom": {
|
||||||
"hash": "sha256-cJA/b8gumQjI2p8gRD9h2Q8IcKMSZCmR/oRioLk5F4Q="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.pom"
|
||||||
"commons-logging-1.1.3.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-MlCsOsa9YO0GMfXNAzUDKymT1j5AWmrgVV0np+SGWEk="
|
||||||
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-MlCsOsa9YO0GMfXNAzUDKymT1j5AWmrgVV0np+SGWEk="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gradle.plugin.net.vivin:gradle-semantic-build-versioning": {
|
"gradle.plugin.net.vivin:gradle-semantic-build-versioning": {
|
||||||
"4.0.0": {
|
"4.0.0": {
|
||||||
"needsPomRedirect": true,
|
"gradle-semantic-build-versioning-4.0.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0/gradle-semantic-build-versioning-4.0.0.jar"
|
||||||
"gradle-semantic-build-versioning-4.0.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-UTjmfOjgGUN4ALk8n2+dD8vr763Jb7xOvAl1yZomHvg="
|
||||||
"https://plugins.gradle.org/m2/gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0/gradle-semantic-build-versioning-4.0.0.jar"
|
},
|
||||||
],
|
"gradle-semantic-build-versioning-4.0.0.pom": {
|
||||||
"hash": "sha256-UTjmfOjgGUN4ALk8n2+dD8vr763Jb7xOvAl1yZomHvg="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0/gradle-semantic-build-versioning-4.0.0.pom"
|
||||||
"gradle-semantic-build-versioning-4.0.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-TygodBYH7RAtletfGJ1JbHhA7UY6zqifHlGmBWdxTvc="
|
||||||
"https://plugins.gradle.org/m2/gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0/gradle-semantic-build-versioning-4.0.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-TygodBYH7RAtletfGJ1JbHhA7UY6zqifHlGmBWdxTvc="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.apache.httpcomponents:httpclient": {
|
"org.apache.httpcomponents:httpclient": {
|
||||||
"4.3.6": {
|
"4.3.6": {
|
||||||
"needsPomRedirect": true,
|
"httpclient-4.3.6.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar"
|
||||||
"httpclient-4.3.6.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-eYONnq73PU+FLGOkgIMMOi1LWQ8Ks66BWkiUY+RxQAQ="
|
||||||
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar"
|
},
|
||||||
],
|
"httpclient-4.3.6.pom": {
|
||||||
"hash": "sha256-eYONnq73PU+FLGOkgIMMOi1LWQ8Ks66BWkiUY+RxQAQ="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.pom"
|
||||||
"httpclient-4.3.6.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-0CY09hMekUlhwCqoNnEeuscnBLJ+JsW9Iju62JsbZMM="
|
||||||
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-0CY09hMekUlhwCqoNnEeuscnBLJ+JsW9Iju62JsbZMM="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.apache.httpcomponents:httpcore": {
|
"org.apache.httpcomponents:httpcore": {
|
||||||
"4.3.3": {
|
"4.3.3": {
|
||||||
"needsPomRedirect": true,
|
"httpcore-4.3.3.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar"
|
||||||
"httpcore-4.3.3.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-UoXegK8WUcSJMTuRqfQMZaTNy2s73nFvzAKNFoaaWpM="
|
||||||
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar"
|
},
|
||||||
],
|
"httpcore-4.3.3.pom": {
|
||||||
"hash": "sha256-UoXegK8WUcSJMTuRqfQMZaTNy2s73nFvzAKNFoaaWpM="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.pom"
|
||||||
"httpcore-4.3.3.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-tCf3z2fHWk4/niEI01v0UwNXPBRex3j8rc/6zvF6EmQ="
|
||||||
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-tCf3z2fHWk4/niEI01v0UwNXPBRex3j8rc/6zvF6EmQ="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.eclipse.jgit:org.eclipse.jgit": {
|
"org.eclipse.jgit:org.eclipse.jgit": {
|
||||||
"4.8.0.201706111038-r": {
|
"4.8.0.201706111038-r": {
|
||||||
"needsPomRedirect": true,
|
"org.eclipse.jgit-4.8.0.201706111038-r.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/4.8.0.201706111038-r/org.eclipse.jgit-4.8.0.201706111038-r.jar"
|
||||||
"org.eclipse.jgit-4.8.0.201706111038-r.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-SdkS6NXM4N0I3KPTkBiduGkqj34zY8274YJYFGIACro="
|
||||||
"https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/4.8.0.201706111038-r/org.eclipse.jgit-4.8.0.201706111038-r.jar"
|
},
|
||||||
],
|
"org.eclipse.jgit-4.8.0.201706111038-r.pom": {
|
||||||
"hash": "sha256-SdkS6NXM4N0I3KPTkBiduGkqj34zY8274YJYFGIACro="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/4.8.0.201706111038-r/org.eclipse.jgit-4.8.0.201706111038-r.pom"
|
||||||
"org.eclipse.jgit-4.8.0.201706111038-r.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-pVap9a38avSbKhLnLcPNfkPbj9whbA81iFlyovWton0="
|
||||||
"https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/4.8.0.201706111038-r/org.eclipse.jgit-4.8.0.201706111038-r.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-pVap9a38avSbKhLnLcPNfkPbj9whbA81iFlyovWton0="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.slf4j:slf4j-api": {
|
"org.slf4j:slf4j-api": {
|
||||||
"1.7.2": {
|
"1.7.2": {
|
||||||
"needsPomRedirect": true,
|
"slf4j-api-1.7.2.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar"
|
||||||
"slf4j-api-1.7.2.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-O654m0ATM7Kh0WA7f6Vz4ZkIYoGRcHID9utwjN7iwFI="
|
||||||
"https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar"
|
},
|
||||||
],
|
"slf4j-api-1.7.2.pom": {
|
||||||
"hash": "sha256-O654m0ATM7Kh0WA7f6Vz4ZkIYoGRcHID9utwjN7iwFI="
|
"urls": [
|
||||||
},
|
"https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom"
|
||||||
"slf4j-api-1.7.2.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-LqynGv4KFRb0q9jp/5B4ONJo84yBw6VCzOjX87h8XUw="
|
||||||
"https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-LqynGv4KFRb0q9jp/5B4ONJo84yBw6VCzOjX87h8XUw="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,33 @@
|
|||||||
{
|
{
|
||||||
"org.opendof.core-java:dof-cipher-sms4": {
|
"org.opendof.core-java:dof-cipher-sms4": {
|
||||||
"1.0": {
|
"1.0": {
|
||||||
"needsPomRedirect": false,
|
"dof-cipher-sms4-1.0.jar": {
|
||||||
"needsIvyRedirect": true,
|
"urls": [
|
||||||
"files": {
|
"https://asset.opendof.org/artifact/org.opendof.core-java/dof-cipher-sms4/1.0/dof-cipher-sms4-1.0.jar"
|
||||||
"dof-cipher-sms4-1.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-/Joo51NA6nBPEwFuFcnDc10JQZDE8P3jF3P4gl0vpMA="
|
||||||
"https://asset.opendof.org/artifact/org.opendof.core-java/dof-cipher-sms4/1.0/dof-cipher-sms4-1.0.jar"
|
},
|
||||||
],
|
"ivy-1.0.xml": {
|
||||||
"hash": "sha256-/Joo51NA6nBPEwFuFcnDc10JQZDE8P3jF3P4gl0vpMA="
|
"urls": [
|
||||||
},
|
"https://asset.opendof.org/ivy2/org.opendof.core-java/dof-cipher-sms4/1.0/ivy.xml"
|
||||||
"ivy-1.0.xml": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-rh+pQpXqPP/cmBD8slvwMrKlWCUb3JNzW3l58hd7oJ8="
|
||||||
"https://asset.opendof.org/ivy2/org.opendof.core-java/dof-cipher-sms4/1.0/ivy.xml"
|
|
||||||
],
|
|
||||||
"hash": "sha256-rh+pQpXqPP/cmBD8slvwMrKlWCUb3JNzW3l58hd7oJ8="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.opendof.core-java:dof-oal": {
|
"org.opendof.core-java:dof-oal": {
|
||||||
"7.0.2": {
|
"7.0.2": {
|
||||||
"needsPomRedirect": false,
|
"dof-oal-7.0.2.jar": {
|
||||||
"needsIvyRedirect": true,
|
"urls": [
|
||||||
"files": {
|
"https://asset.opendof.org/artifact/org.opendof.core-java/dof-oal/7.0.2/dof-oal-7.0.2.jar"
|
||||||
"dof-oal-7.0.2.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-u+FUhQGBA8MRl28mXMTSnZ2HY2ysPHq7h9lANmHBK40="
|
||||||
"https://asset.opendof.org/artifact/org.opendof.core-java/dof-oal/7.0.2/dof-oal-7.0.2.jar"
|
},
|
||||||
],
|
"ivy-7.0.2.xml": {
|
||||||
"hash": "sha256-u+FUhQGBA8MRl28mXMTSnZ2HY2ysPHq7h9lANmHBK40="
|
"urls": [
|
||||||
},
|
"https://asset.opendof.org/ivy2/org.opendof.core-java/dof-oal/7.0.2/ivy.xml"
|
||||||
"ivy-7.0.2.xml": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-KZoUVyoDcfH/B/9V1SVqNiA/XIb3zlwoJkjb/jD+xig="
|
||||||
"https://asset.opendof.org/ivy2/org.opendof.core-java/dof-oal/7.0.2/ivy.xml"
|
|
||||||
],
|
|
||||||
"hash": "sha256-KZoUVyoDcfH/B/9V1SVqNiA/XIb3zlwoJkjb/jD+xig="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,17 @@
|
|||||||
{
|
{
|
||||||
"org.apache:test": {
|
"org.apache:test": {
|
||||||
"1.0.0": {
|
"1.0.0": {
|
||||||
"needsPomRedirect": true,
|
"test-1.0.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar"
|
||||||
"test-1.0.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-M95zEuAwVCam7c2rKIET5qs4Q60sA84RyTA3a9jdQd8="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar"
|
},
|
||||||
],
|
"test-1.0.0.pom": {
|
||||||
"hash": "sha256-M95zEuAwVCam7c2rKIET5qs4Q60sA84RyTA3a9jdQd8="
|
"urls": [
|
||||||
},
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"
|
||||||
"test-1.0.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-sYk8m4+T+hRJ+43tpPkthrE/JftrsMnmuzORCLCK1To="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-sYk8m4+T+hRJ+43tpPkthrE/JftrsMnmuzORCLCK1To="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
{
|
{
|
||||||
"org.apache:test": {
|
"org.apache:test": {
|
||||||
"1.0.0": {
|
"1.0.0": {
|
||||||
"needsPomRedirect": true,
|
"test-1.0.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar"
|
||||||
"test-1.0.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-M95zEuAwVCam7c2rKIET5qs4Q60sA84RyTA3a9jdQd8="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar"
|
},
|
||||||
],
|
"test-1.0.0.pom": {
|
||||||
"hash": "sha256-M95zEuAwVCam7c2rKIET5qs4Q60sA84RyTA3a9jdQd8="
|
"urls": [
|
||||||
},
|
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"
|
||||||
"test-1.0.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-sYk8m4+T+hRJ+43tpPkthrE/JftrsMnmuzORCLCK1To="
|
||||||
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-sYk8m4+T+hRJ+43tpPkthrE/JftrsMnmuzORCLCK1To="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,159 +1,127 @@
|
|||||||
{
|
{
|
||||||
"com.squareup.moshi:moshi": {
|
"com.squareup.moshi:moshi": {
|
||||||
"1.8.0": {
|
"1.8.0": {
|
||||||
"needsPomRedirect": true,
|
"moshi-1.8.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
||||||
"moshi-1.8.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
},
|
||||||
],
|
"moshi-1.8.0.pom": {
|
||||||
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
||||||
"moshi-1.8.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.squareup.okio:okio": {
|
"com.squareup.okio:okio": {
|
||||||
"2.2.2": {
|
"2.2.2": {
|
||||||
"needsPomRedirect": true,
|
"okio-2.2.2.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
||||||
"okio-2.2.2.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
},
|
||||||
],
|
"okio-2.2.2.pom": {
|
||||||
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
||||||
"okio-2.2.2.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"1.16.0": {
|
"1.16.0": {
|
||||||
"needsPomRedirect": true,
|
"okio-1.16.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar"
|
||||||
"okio-1.16.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-7ASE/xkDZA44RcKxCruZ7/LTIwj/40WeX5IwmkUbnH4="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar"
|
},
|
||||||
],
|
"okio-1.16.0.pom": {
|
||||||
"hash": "sha256-7ASE/xkDZA44RcKxCruZ7/LTIwj/40WeX5IwmkUbnH4="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.pom"
|
||||||
"okio-1.16.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-HSUhYhwIdRI6qRMRsv6O3v0O2T9mvm3+oYzGG8XJnjY="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-HSUhYhwIdRI6qRMRsv6O3v0O2T9mvm3+oYzGG8XJnjY="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"junit:junit": {
|
"junit:junit": {
|
||||||
"4.12": {
|
"4.12": {
|
||||||
"needsPomRedirect": true,
|
"junit-4.12.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar"
|
||||||
"junit-4.12.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
|
||||||
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar"
|
},
|
||||||
],
|
"junit-4.12.pom": {
|
||||||
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
|
||||||
"junit-4.12.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
|
||||||
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.hamcrest:hamcrest-core": {
|
"org.hamcrest:hamcrest-core": {
|
||||||
"1.3": {
|
"1.3": {
|
||||||
"needsPomRedirect": true,
|
"hamcrest-core-1.3.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
|
||||||
"hamcrest-core-1.3.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
|
||||||
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
|
},
|
||||||
],
|
"hamcrest-core-1.3.pom": {
|
||||||
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom"
|
||||||
"hamcrest-core-1.3.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-/eOGp5BRc6GxA95quCBydYS1DQ4yKC4nl3h8IKZP+pM="
|
||||||
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-/eOGp5BRc6GxA95quCBydYS1DQ4yKC4nl3h8IKZP+pM="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib": {
|
"org.jetbrains.kotlin:kotlin-stdlib": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
||||||
"kotlin-stdlib-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-1.2.60.pom": {
|
||||||
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
||||||
"kotlin-stdlib-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-common-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
||||||
"kotlin-stdlib-common-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-common-1.2.60.pom": {
|
||||||
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
||||||
"kotlin-stdlib-common-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains:annotations": {
|
"org.jetbrains:annotations": {
|
||||||
"13.0": {
|
"13.0": {
|
||||||
"needsPomRedirect": true,
|
"annotations-13.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
||||||
"annotations-13.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
},
|
||||||
],
|
"annotations-13.0.pom": {
|
||||||
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
||||||
"annotations-13.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,159 +1,127 @@
|
|||||||
{
|
{
|
||||||
"com.squareup.moshi:moshi": {
|
"com.squareup.moshi:moshi": {
|
||||||
"1.8.0": {
|
"1.8.0": {
|
||||||
"needsPomRedirect": true,
|
"moshi-1.8.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
||||||
"moshi-1.8.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
|
},
|
||||||
],
|
"moshi-1.8.0.pom": {
|
||||||
"hash": "sha256-Qv50bSaU6hH+agK+zZ2iyj2v6Xye/VCg+a9cRZbnSmo="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
||||||
"moshi-1.8.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.squareup.okio:okio": {
|
"com.squareup.okio:okio": {
|
||||||
"2.2.2": {
|
"2.2.2": {
|
||||||
"needsPomRedirect": true,
|
"okio-2.2.2.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
||||||
"okio-2.2.2.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
|
},
|
||||||
],
|
"okio-2.2.2.pom": {
|
||||||
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
||||||
"okio-2.2.2.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"1.16.0": {
|
"1.16.0": {
|
||||||
"needsPomRedirect": true,
|
"okio-1.16.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar"
|
||||||
"okio-1.16.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-7ASE/xkDZA44RcKxCruZ7/LTIwj/40WeX5IwmkUbnH4="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar"
|
},
|
||||||
],
|
"okio-1.16.0.pom": {
|
||||||
"hash": "sha256-7ASE/xkDZA44RcKxCruZ7/LTIwj/40WeX5IwmkUbnH4="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.pom"
|
||||||
"okio-1.16.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-HSUhYhwIdRI6qRMRsv6O3v0O2T9mvm3+oYzGG8XJnjY="
|
||||||
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-HSUhYhwIdRI6qRMRsv6O3v0O2T9mvm3+oYzGG8XJnjY="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"junit:junit": {
|
"junit:junit": {
|
||||||
"4.12": {
|
"4.12": {
|
||||||
"needsPomRedirect": true,
|
"junit-4.12.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar"
|
||||||
"junit-4.12.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
|
||||||
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar"
|
},
|
||||||
],
|
"junit-4.12.pom": {
|
||||||
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
|
||||||
"junit-4.12.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
|
||||||
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.hamcrest:hamcrest-core": {
|
"org.hamcrest:hamcrest-core": {
|
||||||
"1.3": {
|
"1.3": {
|
||||||
"needsPomRedirect": true,
|
"hamcrest-core-1.3.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
|
||||||
"hamcrest-core-1.3.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
|
||||||
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
|
},
|
||||||
],
|
"hamcrest-core-1.3.pom": {
|
||||||
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom"
|
||||||
"hamcrest-core-1.3.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-/eOGp5BRc6GxA95quCBydYS1DQ4yKC4nl3h8IKZP+pM="
|
||||||
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-/eOGp5BRc6GxA95quCBydYS1DQ4yKC4nl3h8IKZP+pM="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib": {
|
"org.jetbrains.kotlin:kotlin-stdlib": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
||||||
"kotlin-stdlib-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-1.2.60.pom": {
|
||||||
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
||||||
"kotlin-stdlib-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
"org.jetbrains.kotlin:kotlin-stdlib-common": {
|
||||||
"1.2.60": {
|
"1.2.60": {
|
||||||
"needsPomRedirect": true,
|
"kotlin-stdlib-common-1.2.60.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
||||||
"kotlin-stdlib-common-1.2.60.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
|
},
|
||||||
],
|
"kotlin-stdlib-common-1.2.60.pom": {
|
||||||
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
||||||
"kotlin-stdlib-common-1.2.60.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"org.jetbrains:annotations": {
|
"org.jetbrains:annotations": {
|
||||||
"13.0": {
|
"13.0": {
|
||||||
"needsPomRedirect": true,
|
"annotations-13.0.jar": {
|
||||||
"needsIvyRedirect": false,
|
"urls": [
|
||||||
"files": {
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
||||||
"annotations-13.0.jar": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
|
},
|
||||||
],
|
"annotations-13.0.pom": {
|
||||||
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
|
"urls": [
|
||||||
},
|
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
||||||
"annotations-13.0.pom": {
|
],
|
||||||
"urls": [
|
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
||||||
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
|
|
||||||
],
|
|
||||||
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
fixtures/included-build/groovy/build.gradle
Normal file
10
fixtures/included-build/groovy/build.gradle
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apply plugin: 'java'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url = uri(System.getProperty("org.nixos.gradle2nix.m2")) }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.test.included:included-child'
|
||||||
|
implementation 'org.apache:test:1.0.0'
|
||||||
|
}
|
||||||
11
fixtures/included-build/groovy/included-child/build.gradle
Normal file
11
fixtures/included-build/groovy/included-child/build.gradle
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apply plugin: 'java-library'
|
||||||
|
group = 'org.test.included'
|
||||||
|
version = '1.0'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url = uri(System.getProperty("org.nixos.gradle2nix.m2")) }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.apache:foo:1.0.0'
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
maven { url = uri(System.getProperty("org.nixos.gradle2nix.m2")) }
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'org.apache:foo:2.0.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = 'included-child'
|
||||||
1
fixtures/included-build/groovy/settings.gradle
Normal file
1
fixtures/included-build/groovy/settings.gradle
Normal file
@@ -0,0 +1 @@
|
|||||||
|
includeBuild 'included-child'
|
||||||
BIN
fixtures/repositories/m2/org/apache/foo/1.0.0/foo-1.0.0.jar
Normal file
BIN
fixtures/repositories/m2/org/apache/foo/1.0.0/foo-1.0.0.jar
Normal file
Binary file not shown.
14
fixtures/repositories/m2/org/apache/foo/1.0.0/foo-1.0.0.pom
Normal file
14
fixtures/repositories/m2/org/apache/foo/1.0.0/foo-1.0.0.pom
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>foo</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
|
||||||
|
<name>foo</name>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
foo
|
||||||
|
</description>
|
||||||
|
</project>
|
||||||
BIN
fixtures/repositories/m2/org/apache/foo/2.0.0/foo-2.0.0.jar
Normal file
BIN
fixtures/repositories/m2/org/apache/foo/2.0.0/foo-2.0.0.jar
Normal file
Binary file not shown.
14
fixtures/repositories/m2/org/apache/foo/2.0.0/foo-2.0.0.pom
Normal file
14
fixtures/repositories/m2/org/apache/foo/2.0.0/foo-2.0.0.pom
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>foo</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
|
||||||
|
<name>foo</name>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
foo
|
||||||
|
</description>
|
||||||
|
</project>
|
||||||
31
fixtures/repositories/m2/org/apache/foo/maven-metadata.xml
Normal file
31
fixtures/repositories/m2/org/apache/foo/maven-metadata.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you 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
|
||||||
|
|
||||||
|
https://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.
|
||||||
|
-->
|
||||||
|
<metadata>
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>foo</artifactId>
|
||||||
|
<versioning>
|
||||||
|
<latest>2.0.0</latest>
|
||||||
|
<release>2.0.0</release>
|
||||||
|
<versions>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</versions>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
@@ -1 +0,0 @@
|
|||||||
88e79ca0e696263e63bc9dc759a2e9c0d66e36d9
|
|
||||||
BIN
fixtures/repositories/m2/org/apache/test/2.0.0/test-2.0.0.jar
Normal file
BIN
fixtures/repositories/m2/org/apache/test/2.0.0/test-2.0.0.jar
Normal file
Binary file not shown.
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>test</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
|
||||||
|
<name>test</name>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
test
|
||||||
|
</description>
|
||||||
|
</project>
|
||||||
@@ -20,5 +20,12 @@
|
|||||||
<metadata>
|
<metadata>
|
||||||
<groupId>org.apache</groupId>
|
<groupId>org.apache</groupId>
|
||||||
<artifactId>test</artifactId>
|
<artifactId>test</artifactId>
|
||||||
<version>1.0.0</version>
|
<versioning>
|
||||||
|
<latest>2.0.0</latest>
|
||||||
|
<release>2.0.0</release>
|
||||||
|
<versions>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</versions>
|
||||||
|
</versioning>
|
||||||
</metadata>
|
</metadata>
|
||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -5,11 +5,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1701680307,
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696589439,
|
"lastModified": 1702855317,
|
||||||
"narHash": "sha256-Ye+flokLfswVz9PZEyJ5yGJ1VqmJe3bDgwWt9Z4MuqQ=",
|
"narHash": "sha256-5EXeUkoWvrfbZQQLVRn7Ebb9LOt3DkVm6T0M31/VhtM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e462c9172c685f0839baaa54bb5b49276a23dab7",
|
"rev": "3a16c6447466f4034c2d75fe7014477142c9513e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
11705
gradle-env.json
11705
gradle-env.json
File diff suppressed because it is too large
Load Diff
345
gradle-env.nix
345
gradle-env.nix
@@ -25,6 +25,8 @@
|
|||||||
, fetchs3
|
, fetchs3
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, gradleGen
|
, gradleGen
|
||||||
|
, runCommandLocal
|
||||||
|
, symlinkJoin
|
||||||
, writeText
|
, writeText
|
||||||
, writeTextDir
|
, writeTextDir
|
||||||
}:
|
}:
|
||||||
@@ -32,7 +34,7 @@
|
|||||||
{
|
{
|
||||||
# Path to the environment spec generated by gradle2nix (e.g. gradle-env.json).
|
# Path to the environment spec generated by gradle2nix (e.g. gradle-env.json).
|
||||||
envSpec
|
envSpec
|
||||||
, pname ? null
|
, pname ? "project"
|
||||||
, version ? null
|
, version ? null
|
||||||
, enableParallelBuilding ? true
|
, enableParallelBuilding ? true
|
||||||
# Arguments to Gradle used to build the project in buildPhase.
|
# Arguments to Gradle used to build the project in buildPhase.
|
||||||
@@ -52,9 +54,10 @@
|
|||||||
# `{ urls, sha256 }` and fetch into the Nix store. For example:
|
# `{ urls, sha256 }` and fetch into the Nix store. For example:
|
||||||
#
|
#
|
||||||
# {
|
# {
|
||||||
# s3 = { urls, sha256 }: fetchs3 {
|
# s3 = { name, urls, hash }: fetchs3 {
|
||||||
# s3url = builtins.head urls;
|
# s3url = builtins.head urls;
|
||||||
# inherit sha256;
|
# # TODO This doesn't work without patching fetchs3 to accept SRI hashes
|
||||||
|
# inherit name hash;
|
||||||
# region = "us-west-2";
|
# region = "us-west-2";
|
||||||
# credentials = {
|
# credentials = {
|
||||||
# access_key_id = "foo";
|
# access_key_id = "foo";
|
||||||
@@ -67,7 +70,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
attrValues concatStringsSep filter fromJSON getAttr head match
|
attrValues concatStringsSep elemAt filter fromJSON getAttr head match
|
||||||
replaceStrings sort;
|
replaceStrings sort;
|
||||||
|
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
@@ -75,162 +78,185 @@ let
|
|||||||
mapAttrsToList optionalString readFile removeSuffix unique versionAtLeast
|
mapAttrsToList optionalString readFile removeSuffix unique versionAtLeast
|
||||||
versionOlder;
|
versionOlder;
|
||||||
|
|
||||||
|
inherit (lib.strings) sanitizeDerivationName;
|
||||||
|
|
||||||
|
toCoordinates = id:
|
||||||
|
let
|
||||||
|
coords = builtins.split ":" id;
|
||||||
|
in {
|
||||||
|
group = elemAt coords 0;
|
||||||
|
module = elemAt coords 2;
|
||||||
|
};
|
||||||
|
|
||||||
fetchers' = {
|
fetchers' = {
|
||||||
http = fetchurl;
|
http = fetchurl;
|
||||||
https = fetchurl;
|
https = fetchurl;
|
||||||
s3 = { urls, sha256 }: fetchs3 {
|
|
||||||
s3url = head urls;
|
|
||||||
inherit sha256;
|
|
||||||
};
|
|
||||||
} // fetchers;
|
} // fetchers;
|
||||||
|
|
||||||
# Fetch urls using the scheme for the first entry only; there isn't a
|
# Fetch urls using the scheme for the first entry only; there isn't a
|
||||||
# straightforward way to tell Nix to try multiple fetchers in turn
|
# straightforward way to tell Nix to try multiple fetchers in turn
|
||||||
# and short-circuit on the first successful fetch.
|
# and short-circuit on the first successful fetch.
|
||||||
fetch = { urls, sha256 }:
|
fetch = _: { urls, hash }:
|
||||||
let
|
let
|
||||||
first = head urls;
|
first = head urls;
|
||||||
scheme = head (builtins.match "([a-z0-9+.-]+)://.*" first);
|
scheme = head (builtins.match "([a-z0-9+.-]+)://.*" first);
|
||||||
fetch' = getAttr scheme fetchers';
|
fetch' = getAttr scheme fetchers';
|
||||||
urls' = filter (hasPrefix scheme) urls;
|
urls' = filter (hasPrefix scheme) urls;
|
||||||
in
|
in
|
||||||
fetch' { urls = urls'; inherit sha256; };
|
fetch' { urls = urls'; inherit hash; };
|
||||||
|
|
||||||
mkDep = { name, path, urls, sha256, ... }: stdenv.mkDerivation {
|
mkDep = id: version: artifacts:
|
||||||
inherit name;
|
|
||||||
|
|
||||||
src = fetch {
|
|
||||||
inherit urls sha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
phases = "installPhase";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/${path}
|
|
||||||
ln -s $src $out/${path}/${name}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
mkModuleMetadata = deps:
|
|
||||||
let
|
let
|
||||||
ids = filter
|
coords = toCoordinates id;
|
||||||
(id: id.type == "pom")
|
modulePath = "${replaceStrings ["."] ["/"] coords.group}/${coords.module}/${version}";
|
||||||
(map (dep: dep.id) deps);
|
|
||||||
|
|
||||||
modules = groupBy'
|
|
||||||
(meta: id:
|
|
||||||
let
|
|
||||||
isNewer = versionOlder meta.latest id.version;
|
|
||||||
isNewerRelease =
|
|
||||||
!(hasSuffix "-SNAPSHOT" id.version) &&
|
|
||||||
versionOlder meta.release id.version;
|
|
||||||
in {
|
|
||||||
groupId = id.group;
|
|
||||||
artifactId = id.name;
|
|
||||||
latest = if isNewer then id.version else meta.latest;
|
|
||||||
release = if isNewerRelease then id.version else meta.release;
|
|
||||||
versions = meta.versions ++ [id.version];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
{
|
|
||||||
latest = "";
|
|
||||||
release = "";
|
|
||||||
versions = [];
|
|
||||||
}
|
|
||||||
(id: "${replaceStrings ["."] ["/"] id.group}/${id.name}/maven-metadata.xml")
|
|
||||||
ids;
|
|
||||||
|
|
||||||
in
|
in
|
||||||
attrValues (mapAttrs (path: meta:
|
stdenv.mkDerivation {
|
||||||
let
|
pname = "${coords.group}-${coords.module}";
|
||||||
versions' = sort versionOlder (unique meta.versions);
|
version = version;
|
||||||
in
|
|
||||||
with meta; writeTextDir path ''
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<metadata modelVersion="1.1">
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<versioning>
|
|
||||||
${optionalString (latest != "") "<latest>${latest}</latest>"}
|
|
||||||
${optionalString (release != "") "<release>${release}</release>"}
|
|
||||||
<versions>
|
|
||||||
${concatMapStringsSep "\n " (v: "<version>${v}</version>") versions'}
|
|
||||||
</versions>
|
|
||||||
</versioning>
|
|
||||||
</metadata>
|
|
||||||
''
|
|
||||||
) modules);
|
|
||||||
|
|
||||||
mkSnapshotMetadata = deps:
|
srcs = mapAttrsToList fetch artifacts;
|
||||||
let
|
|
||||||
snapshotDeps = filter (dep: dep ? build && dep ? timestamp) deps;
|
|
||||||
|
|
||||||
modules = groupBy'
|
dontPatch = true;
|
||||||
(meta: dep:
|
dontConfigure = true;
|
||||||
let
|
dontBuild = true;
|
||||||
id = dep.id;
|
dontFixup = true;
|
||||||
isNewer = dep.build > meta.buildNumber;
|
dontInstall = true;
|
||||||
# Timestamp values can be bogus, e.g. jitpack.io
|
|
||||||
updated = if (match "[0-9]{8}\.[0-9]{6}" dep.timestamp) != null
|
|
||||||
then replaceStrings ["."] [""] dep.timestamp
|
|
||||||
else "";
|
|
||||||
in {
|
|
||||||
groupId = id.group;
|
|
||||||
artifactId = id.name;
|
|
||||||
version = id.version;
|
|
||||||
timestamp = if isNewer then dep.timestamp else meta.timestamp;
|
|
||||||
buildNumber = if isNewer then dep.build else meta.buildNumber;
|
|
||||||
lastUpdated = if isNewer then updated else meta.lastUpdated;
|
|
||||||
versions = meta.versions or [] ++ [{
|
|
||||||
classifier = id.classifier or "";
|
|
||||||
extension = id.extension;
|
|
||||||
value = "${removeSuffix "-SNAPSHOT" id.version}-${dep.timestamp}-${toString dep.build}";
|
|
||||||
updated = updated;
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
{
|
|
||||||
timestamp = "";
|
|
||||||
buildNumber = -1;
|
|
||||||
lastUpdated = "";
|
|
||||||
}
|
|
||||||
(dep: "${replaceStrings ["."] ["/"] dep.id.group}/${dep.id.name}/${dep.id.version}/maven-metadata.xml")
|
|
||||||
snapshotDeps;
|
|
||||||
|
|
||||||
mkSnapshotVersion = version: ''
|
preUnpack = ''
|
||||||
<snapshotVersion>
|
mkdir -p "$out/${modulePath}"
|
||||||
${optionalString (version.classifier != "") "<classifier>${version.classifier}</classifier>"}
|
'';
|
||||||
<extension>${version.extension}</extension>
|
|
||||||
<value>${version.value}</value>
|
|
||||||
${optionalString (version.updated != "") "<updated>${version.updated}</updated>"}
|
|
||||||
</snapshotVersion>
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
unpackCmd = ''
|
||||||
attrValues (mapAttrs (path: meta:
|
cp "$curSrc" "$out/${modulePath}/$(stripHash "$curSrc")"
|
||||||
with meta; writeTextDir path ''
|
'';
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<metadata modelVersion="1.1">
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<version>${version}</version>
|
|
||||||
<versioning>
|
|
||||||
<snapshot>
|
|
||||||
${optionalString (timestamp != "") "<timestamp>${timestamp}</timestamp>"}
|
|
||||||
${optionalString (buildNumber != -1) "<buildNumber>${toString buildNumber}</buildNumber>"}
|
|
||||||
</snapshot>
|
|
||||||
${optionalString (lastUpdated != "") "<lastUpdated>${lastUpdated}</lastUpdated>"}
|
|
||||||
<snapshotVersions>
|
|
||||||
${concatMapStringsSep "\n " mkSnapshotVersion versions}
|
|
||||||
</snapshotVersions>
|
|
||||||
</versioning>
|
|
||||||
</metadata>
|
|
||||||
''
|
|
||||||
) modules);
|
|
||||||
|
|
||||||
mkRepo = project: type: deps: buildEnv {
|
sourceRoot = ".";
|
||||||
name = "${project}-gradle-${type}-env";
|
|
||||||
paths = map mkDep deps ++ mkModuleMetadata deps ++ mkSnapshotMetadata deps;
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
mkModule = id: versions:
|
||||||
|
mapAttrsToList (version: artifacts: mkDep id version artifacts) versions;
|
||||||
|
|
||||||
|
mkModuleMetadata = id: versions:
|
||||||
|
let
|
||||||
|
|
||||||
|
modules = groupBy'
|
||||||
|
(meta: id:
|
||||||
|
let
|
||||||
|
isNewer = versionOlder meta.latest id.version;
|
||||||
|
isNewerRelease =
|
||||||
|
!(hasSuffix "-SNAPSHOT" id.version) &&
|
||||||
|
versionOlder meta.release id.version;
|
||||||
|
in {
|
||||||
|
groupId = id.group;
|
||||||
|
artifactId = id.name;
|
||||||
|
latest = if isNewer then id.version else meta.latest;
|
||||||
|
release = if isNewerRelease then id.version else meta.release;
|
||||||
|
versions = meta.versions ++ [id.version];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
{
|
||||||
|
latest = "";
|
||||||
|
release = "";
|
||||||
|
versions = [];
|
||||||
|
}
|
||||||
|
(id: "${replaceStrings ["."] ["/"] id.group}/${id.name}/maven-metadata.xml")
|
||||||
|
ids;
|
||||||
|
|
||||||
|
in
|
||||||
|
attrValues (mapAttrs (path: meta:
|
||||||
|
let
|
||||||
|
versions' = sort versionOlder (unique meta.versions);
|
||||||
|
in
|
||||||
|
with meta; writeTextDir path ''
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata modelVersion="1.1">
|
||||||
|
<groupId>${groupId}</groupId>
|
||||||
|
<artifactId>${artifactId}</artifactId>
|
||||||
|
<versioning>
|
||||||
|
${optionalString (latest != "") "<latest>${latest}</latest>"}
|
||||||
|
${optionalString (release != "") "<release>${release}</release>"}
|
||||||
|
<versions>
|
||||||
|
${concatMapStringsSep "\n " (v: "<version>${v}</version>") versions'}
|
||||||
|
</versions>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
|
''
|
||||||
|
) modules);
|
||||||
|
|
||||||
|
# mkSnapshotMetadata = deps:
|
||||||
|
# let
|
||||||
|
# snapshotDeps = filter (dep: dep ? build && dep ? timestamp) deps;
|
||||||
|
|
||||||
|
# modules = groupBy'
|
||||||
|
# (meta: dep:
|
||||||
|
# let
|
||||||
|
# id = dep.id;
|
||||||
|
# isNewer = dep.build > meta.buildNumber;
|
||||||
|
# # Timestamp values can be bogus, e.g. jitpack.io
|
||||||
|
# updated = if (match "[0-9]{8}\.[0-9]{6}" dep.timestamp) != null
|
||||||
|
# then replaceStrings ["."] [""] dep.timestamp
|
||||||
|
# else "";
|
||||||
|
# in {
|
||||||
|
# groupId = id.group;
|
||||||
|
# artifactId = id.name;
|
||||||
|
# version = id.version;
|
||||||
|
# timestamp = if isNewer then dep.timestamp else meta.timestamp;
|
||||||
|
# buildNumber = if isNewer then dep.build else meta.buildNumber;
|
||||||
|
# lastUpdated = if isNewer then updated else meta.lastUpdated;
|
||||||
|
# versions = meta.versions or [] ++ [{
|
||||||
|
# classifier = id.classifier or "";
|
||||||
|
# extension = id.extension;
|
||||||
|
# value = "${removeSuffix "-SNAPSHOT" id.version}-${dep.timestamp}-${toString dep.build}";
|
||||||
|
# updated = updated;
|
||||||
|
# }];
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# {
|
||||||
|
# timestamp = "";
|
||||||
|
# buildNumber = -1;
|
||||||
|
# lastUpdated = "";
|
||||||
|
# }
|
||||||
|
# (dep: "${replaceStrings ["."] ["/"] dep.id.group}/${dep.id.name}/${dep.id.version}/maven-metadata.xml")
|
||||||
|
# snapshotDeps;
|
||||||
|
|
||||||
|
# mkSnapshotVersion = version: ''
|
||||||
|
# <snapshotVersion>
|
||||||
|
# ${optionalString (version.classifier != "") "<classifier>${version.classifier}</classifier>"}
|
||||||
|
# <extension>${version.extension}</extension>
|
||||||
|
# <value>${version.value}</value>
|
||||||
|
# ${optionalString (version.updated != "") "<updated>${version.updated}</updated>"}
|
||||||
|
# </snapshotVersion>
|
||||||
|
# '';
|
||||||
|
|
||||||
|
# in
|
||||||
|
# attrValues (mapAttrs (path: meta:
|
||||||
|
# with meta; writeTextDir path ''
|
||||||
|
# <?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
# <metadata modelVersion="1.1">
|
||||||
|
# <groupId>${groupId}</groupId>
|
||||||
|
# <artifactId>${artifactId}</artifactId>
|
||||||
|
# <version>${version}</version>
|
||||||
|
# <versioning>
|
||||||
|
# <snapshot>
|
||||||
|
# ${optionalString (timestamp != "") "<timestamp>${timestamp}</timestamp>"}
|
||||||
|
# ${optionalString (buildNumber != -1) "<buildNumber>${toString buildNumber}</buildNumber>"}
|
||||||
|
# </snapshot>
|
||||||
|
# ${optionalString (lastUpdated != "") "<lastUpdated>${lastUpdated}</lastUpdated>"}
|
||||||
|
# <snapshotVersions>
|
||||||
|
# ${concatMapStringsSep "\n " mkSnapshotVersion versions}
|
||||||
|
# </snapshotVersions>
|
||||||
|
# </versioning>
|
||||||
|
# </metadata>
|
||||||
|
# ''
|
||||||
|
# ) modules);
|
||||||
|
|
||||||
|
mkRepo = name: deps: symlinkJoin {
|
||||||
|
name = "${name}-gradle-env";
|
||||||
|
# paths = map mkDep deps ++ mkModuleMetadata deps ++ mkSnapshotMetadata deps;
|
||||||
|
paths = mapAttrsToList mkModule deps;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkInitScript = projectSpec: gradle:
|
mkInitScript = projectSpec: gradle:
|
||||||
@@ -264,12 +290,12 @@ let
|
|||||||
static def offlineRepo(RepositoryHandler repositories, String env, String path) {
|
static def offlineRepo(RepositoryHandler repositories, String env, String path) {
|
||||||
repositories.clear()
|
repositories.clear()
|
||||||
repositories.maven {
|
repositories.maven {
|
||||||
name "Nix''${env.capitalize()}MavenOffline"
|
name "Nix''${env.capitalize()}Offline"
|
||||||
url path
|
url path
|
||||||
metadataSources {
|
metadataSources {
|
||||||
it.gradleMetadata()
|
it.gradleMetadata()
|
||||||
it.mavenPom()
|
it.mavenPom()
|
||||||
it.artifact()
|
it.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories.ivy {
|
repositories.ivy {
|
||||||
@@ -279,7 +305,6 @@ let
|
|||||||
metadataSources {
|
metadataSources {
|
||||||
it.gradleMetadata()
|
it.gradleMetadata()
|
||||||
it.ivyDescriptor()
|
it.ivyDescriptor()
|
||||||
it.artifact()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,29 +396,31 @@ let
|
|||||||
|
|
||||||
buildRootProject = buildProject projectEnv gradleFlags;
|
buildRootProject = buildProject projectEnv gradleFlags;
|
||||||
|
|
||||||
in stdenv.mkDerivation (args // {
|
# in stdenv.mkDerivation (args // {
|
||||||
|
|
||||||
inherit pname version;
|
# inherit pname version;
|
||||||
|
|
||||||
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ projectEnv.gradle ];
|
# nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ projectEnv.gradle ];
|
||||||
|
|
||||||
buildPhase = args.buildPhase or ''
|
# buildPhase = args.buildPhase or ''
|
||||||
runHook preBuild
|
# runHook preBuild
|
||||||
|
|
||||||
(
|
# (
|
||||||
set -eux
|
# set -eux
|
||||||
|
|
||||||
# Work around https://github.com/gradle/gradle/issues/1055
|
# # Work around https://github.com/gradle/gradle/issues/1055
|
||||||
TMPHOME="$(mktemp -d)"
|
# TMPHOME="$(mktemp -d)"
|
||||||
mkdir -p "$TMPHOME/init.d"
|
# mkdir -p "$TMPHOME/init.d"
|
||||||
export GRADLE_USER_HOME="$TMPHOME"
|
# export GRADLE_USER_HOME="$TMPHOME"
|
||||||
|
|
||||||
${buildIncludedProjects}
|
# ${buildIncludedProjects}
|
||||||
${buildRootProject}
|
# ${buildRootProject}
|
||||||
)
|
# )
|
||||||
|
|
||||||
runHook postBuild
|
# runHook postBuild
|
||||||
'';
|
# '';
|
||||||
|
|
||||||
dontStrip = true;
|
# dontStrip = true;
|
||||||
})
|
# })
|
||||||
|
|
||||||
|
in mkRepo pname (fromJSON (readFile envSpec))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
gradle = "8.3"
|
gradle = "8.5"
|
||||||
kotlin = "1.9.20-Beta2"
|
kotlin = "1.9.21"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
clikt = "com.github.ajalt:clikt:+"
|
clikt = "com.github.ajalt:clikt:+"
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
15
gradlew
vendored
15
gradlew
vendored
@@ -83,10 +83,8 @@ done
|
|||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -133,10 +131,13 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
@@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command;
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
package org.nixos.gradle2nix
|
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class DependencyCoordinates(val group: String, val module: String, val version: String) {
|
|
||||||
override fun toString(): String = "$group:$module:$version"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class DependencyCoordinates(
|
||||||
|
val group: String,
|
||||||
|
val module: String,
|
||||||
|
val version: String,
|
||||||
|
val timestamp: String? = null
|
||||||
|
) {
|
||||||
|
override fun toString(): String = if (timestamp != null) {
|
||||||
|
"$group:$module:$version:$timestamp"
|
||||||
|
} else {
|
||||||
|
"$group:$module:$version"
|
||||||
|
}
|
||||||
|
|
||||||
|
val isSnapshot: Boolean get() = timestamp != null
|
||||||
|
val moduleVersion: String get() = version
|
||||||
|
val artifactVersion: String get() =
|
||||||
|
timestamp?.let { version.replace("SNAPSHOT", it) } ?: version
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun parse(id: String): DependencyCoordinates {
|
||||||
|
val parts = id.split(":")
|
||||||
|
return when (parts.size) {
|
||||||
|
3 -> DependencyCoordinates(parts[0], parts[1], parts[2])
|
||||||
|
4 -> DependencyCoordinates(parts[0], parts[1], parts[2], parts[3])
|
||||||
|
else -> throw IllegalStateException(
|
||||||
|
"couldn't parse dependency coordinates: '$id'"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nixos.gradle2nix.dependencygraph.model
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,4 +11,16 @@ import kotlinx.serialization.Serializable
|
|||||||
* We attempt to map this to an actual source file location when building a dependency report.
|
* We attempt to map this to an actual source file location when building a dependency report.
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class DependencySource(val id: String, val path: String)
|
data class DependencySource(
|
||||||
|
val targetType: ConfigurationTarget,
|
||||||
|
val targetPath: String,
|
||||||
|
val buildPath: String,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
enum class ConfigurationTarget {
|
||||||
|
@SerialName("gradle") GRADLE,
|
||||||
|
@SerialName("settings") SETTINGS,
|
||||||
|
@SerialName("buildscript") BUILDSCRIPT,
|
||||||
|
@SerialName("project") PROJECT,
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nixos.gradle2nix
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
const val PARAM_INCLUDE_PROJECTS = "NIX_INCLUDE_PROJECTS"
|
const val PARAM_INCLUDE_PROJECTS = "NIX_INCLUDE_PROJECTS"
|
||||||
const val PARAM_INCLUDE_CONFIGURATIONS = "NIX_INCLUDE_CONFIGURATIONS"
|
const val PARAM_INCLUDE_CONFIGURATIONS = "NIX_INCLUDE_CONFIGURATIONS"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nixos.gradle2nix.dependencygraph.model
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ResolvedArtifact(
|
||||||
|
val type: Type?,
|
||||||
|
val file: String,
|
||||||
|
) {
|
||||||
|
enum class Type {
|
||||||
|
SOURCES,
|
||||||
|
JAVADOC,
|
||||||
|
IVY_DESCRIPTOR,
|
||||||
|
MAVEN_POM,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nixos.gradle2nix.dependencygraph.model
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package org.nixos.gradle2nix.dependencygraph.model
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import org.nixos.gradle2nix.DependencyCoordinates
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ResolvedDependency(
|
data class ResolvedDependency(
|
||||||
@@ -10,5 +9,5 @@ data class ResolvedDependency(
|
|||||||
val direct: Boolean,
|
val direct: Boolean,
|
||||||
val coordinates: DependencyCoordinates,
|
val coordinates: DependencyCoordinates,
|
||||||
val repository: String?,
|
val repository: String?,
|
||||||
val dependencies: List<String>
|
val dependencies: List<String> = emptyList(),
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package org.nixos.gradle2nix.model
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ResolvedMetadata(
|
||||||
|
val moduleId: String,
|
||||||
|
val uri: String
|
||||||
|
)
|
||||||
@@ -5,7 +5,7 @@ import kotlinx.serialization.ExperimentalSerializationApi
|
|||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.encodeToStream
|
import kotlinx.serialization.json.encodeToStream
|
||||||
import org.nixos.gradle2nix.dependencygraph.DependencyGraphRenderer
|
import org.nixos.gradle2nix.dependencygraph.DependencyGraphRenderer
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration
|
import org.nixos.gradle2nix.model.ResolvedConfiguration
|
||||||
|
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
private val json = Json {
|
private val json = Json {
|
||||||
|
|||||||
@@ -1,15 +1,26 @@
|
|||||||
package org.nixos.gradle2nix.dependencygraph
|
package org.nixos.gradle2nix.dependencygraph
|
||||||
|
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
|
import org.gradle.api.internal.GradleInternal
|
||||||
|
import org.gradle.api.internal.project.DefaultProjectRegistry
|
||||||
|
import org.gradle.api.internal.project.ProjectInternal
|
||||||
|
import org.gradle.api.internal.project.ProjectRegistry
|
||||||
import org.gradle.api.invocation.Gradle
|
import org.gradle.api.invocation.Gradle
|
||||||
|
import org.gradle.api.logging.Logging
|
||||||
import org.gradle.api.provider.Provider
|
import org.gradle.api.provider.Provider
|
||||||
|
import org.gradle.api.services.internal.RegisteredBuildServiceProvider
|
||||||
|
import org.gradle.internal.build.BuildProjectRegistry
|
||||||
import org.gradle.internal.build.event.BuildEventListenerRegistryInternal
|
import org.gradle.internal.build.event.BuildEventListenerRegistryInternal
|
||||||
|
import org.gradle.internal.composite.IncludedBuildInternal
|
||||||
|
import org.gradle.internal.operations.BuildOperationAncestryTracker
|
||||||
|
import org.gradle.internal.operations.BuildOperationListenerManager
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
import org.nixos.gradle2nix.dependencygraph.extractor.DependencyExtractor
|
import org.nixos.gradle2nix.dependencygraph.extractor.DependencyExtractor
|
||||||
import org.nixos.gradle2nix.dependencygraph.extractor.DependencyExtractorBuildService
|
import org.nixos.gradle2nix.dependencygraph.extractor.DependencyExtractorBuildService
|
||||||
import org.nixos.gradle2nix.dependencygraph.extractor.LegacyDependencyExtractor
|
import org.nixos.gradle2nix.dependencygraph.extractor.LegacyDependencyExtractor
|
||||||
import org.nixos.gradle2nix.dependencygraph.util.buildDirCompat
|
import org.nixos.gradle2nix.dependencygraph.util.buildDirCompat
|
||||||
import org.nixos.gradle2nix.dependencygraph.util.service
|
import org.nixos.gradle2nix.dependencygraph.util.service
|
||||||
|
import org.nixos.gradle2nix.model.ConfigurationTarget
|
||||||
|
|
||||||
abstract class AbstractDependencyExtractorPlugin : Plugin<Gradle> {
|
abstract class AbstractDependencyExtractorPlugin : Plugin<Gradle> {
|
||||||
// Register extension functions on `Gradle` type
|
// Register extension functions on `Gradle` type
|
||||||
@@ -39,6 +50,15 @@ abstract class AbstractDependencyExtractorPlugin : Plugin<Gradle> {
|
|||||||
.rootProjectBuildDirectory = project.buildDirCompat
|
.rootProjectBuildDirectory = project.buildDirCompat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val logger = Logging.getLogger(AbstractDependencyExtractorPlugin::class.java.name)
|
||||||
|
|
||||||
|
gradle.projectsLoaded {
|
||||||
|
(gradle as GradleInternal).let { g ->
|
||||||
|
logger.lifecycle("all projects: ${g.owner.projects.allProjects}")
|
||||||
|
logger.lifecycle("included projects: ${g.includedBuilds().flatMap { it.target.projects.allProjects }.joinToString { it.identityPath.path }}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Register the service to listen for Build Events
|
// Register the service to listen for Build Events
|
||||||
applicatorStrategy.registerExtractorListener(gradle, dependencyExtractorProvider)
|
applicatorStrategy.registerExtractorListener(gradle, dependencyExtractorProvider)
|
||||||
|
|
||||||
@@ -122,7 +142,6 @@ abstract class AbstractDependencyExtractorPlugin : Plugin<Gradle> {
|
|||||||
gradle: Gradle,
|
gradle: Gradle,
|
||||||
extractorServiceProvider: Provider<out DependencyExtractor>
|
extractorServiceProvider: Provider<out DependencyExtractor>
|
||||||
) {
|
) {
|
||||||
// No-op as DependencyExtractorService is Auto-Closable
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.nixos.gradle2nix.dependencygraph
|
package org.nixos.gradle2nix.dependencygraph
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration
|
import org.nixos.gradle2nix.model.ResolvedConfiguration
|
||||||
|
|
||||||
interface DependencyGraphRenderer {
|
interface DependencyGraphRenderer {
|
||||||
fun outputDependencyGraph(
|
fun outputDependencyGraph(
|
||||||
|
|||||||
@@ -3,12 +3,27 @@ package org.nixos.gradle2nix.dependencygraph.extractor
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import java.util.Collections
|
import java.util.Collections
|
||||||
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import org.gradle.api.GradleException
|
import org.gradle.api.GradleException
|
||||||
|
import org.gradle.api.artifacts.DependencyResolutionListener
|
||||||
|
import org.gradle.api.artifacts.ResolvableDependencies
|
||||||
|
import org.gradle.api.artifacts.component.BuildIdentifier
|
||||||
|
import org.gradle.api.artifacts.component.ModuleComponentIdentifier
|
||||||
|
import org.gradle.api.artifacts.query.ArtifactResolutionQuery
|
||||||
|
import org.gradle.api.artifacts.result.ResolvedArtifactResult
|
||||||
import org.gradle.api.artifacts.result.ResolvedComponentResult
|
import org.gradle.api.artifacts.result.ResolvedComponentResult
|
||||||
import org.gradle.api.artifacts.result.ResolvedDependencyResult
|
import org.gradle.api.artifacts.result.ResolvedDependencyResult
|
||||||
|
import org.gradle.api.component.Artifact
|
||||||
|
import org.gradle.api.internal.artifacts.DefaultModuleVersionIdentifier
|
||||||
import org.gradle.api.internal.artifacts.DefaultProjectComponentIdentifier
|
import org.gradle.api.internal.artifacts.DefaultProjectComponentIdentifier
|
||||||
import org.gradle.api.internal.artifacts.configurations.ResolveConfigurationDependenciesBuildOperationType
|
import org.gradle.api.internal.artifacts.configurations.ResolveConfigurationDependenciesBuildOperationType
|
||||||
|
import org.gradle.api.internal.artifacts.repositories.resolver.MavenUniqueSnapshotComponentIdentifier
|
||||||
import org.gradle.api.logging.Logging
|
import org.gradle.api.logging.Logging
|
||||||
|
import org.gradle.configuration.ApplyScriptPluginBuildOperationType
|
||||||
|
import org.gradle.configuration.ConfigurationTargetIdentifier
|
||||||
|
import org.gradle.initialization.LoadBuildBuildOperationType
|
||||||
|
import org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier
|
||||||
|
import org.gradle.internal.component.external.model.ModuleComponentArtifactIdentifier
|
||||||
import org.gradle.internal.exceptions.DefaultMultiCauseException
|
import org.gradle.internal.exceptions.DefaultMultiCauseException
|
||||||
import org.gradle.internal.operations.BuildOperationDescriptor
|
import org.gradle.internal.operations.BuildOperationDescriptor
|
||||||
import org.gradle.internal.operations.BuildOperationListener
|
import org.gradle.internal.operations.BuildOperationListener
|
||||||
@@ -16,27 +31,44 @@ import org.gradle.internal.operations.OperationFinishEvent
|
|||||||
import org.gradle.internal.operations.OperationIdentifier
|
import org.gradle.internal.operations.OperationIdentifier
|
||||||
import org.gradle.internal.operations.OperationProgressEvent
|
import org.gradle.internal.operations.OperationProgressEvent
|
||||||
import org.gradle.internal.operations.OperationStartEvent
|
import org.gradle.internal.operations.OperationStartEvent
|
||||||
import org.nixos.gradle2nix.PARAM_INCLUDE_CONFIGURATIONS
|
import org.gradle.ivy.IvyDescriptorArtifact
|
||||||
import org.nixos.gradle2nix.PARAM_INCLUDE_PROJECTS
|
import org.gradle.jvm.JvmLibrary
|
||||||
import org.nixos.gradle2nix.PARAM_REPORT_DIR
|
import org.gradle.language.base.artifact.SourcesArtifact
|
||||||
|
import org.gradle.language.java.artifact.JavadocArtifact
|
||||||
|
import org.gradle.maven.MavenPomArtifact
|
||||||
|
import org.gradle.util.GradleVersion
|
||||||
import org.nixos.gradle2nix.dependencygraph.DependencyGraphRenderer
|
import org.nixos.gradle2nix.dependencygraph.DependencyGraphRenderer
|
||||||
import org.nixos.gradle2nix.DependencyCoordinates
|
import org.nixos.gradle2nix.dependencygraph.util.BuildOperationTracker
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.DependencySource
|
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.Repository
|
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration
|
|
||||||
import org.nixos.gradle2nix.dependencygraph.model.ResolvedDependency
|
|
||||||
import org.nixos.gradle2nix.dependencygraph.util.loadOptionalParam
|
import org.nixos.gradle2nix.dependencygraph.util.loadOptionalParam
|
||||||
|
import org.nixos.gradle2nix.model.ConfigurationTarget
|
||||||
|
import org.nixos.gradle2nix.model.DependencyCoordinates
|
||||||
|
import org.nixos.gradle2nix.model.DependencySource
|
||||||
|
import org.nixos.gradle2nix.model.PARAM_INCLUDE_CONFIGURATIONS
|
||||||
|
import org.nixos.gradle2nix.model.PARAM_INCLUDE_PROJECTS
|
||||||
|
import org.nixos.gradle2nix.model.PARAM_REPORT_DIR
|
||||||
|
import org.nixos.gradle2nix.model.Repository
|
||||||
|
import org.nixos.gradle2nix.model.ResolvedArtifact
|
||||||
|
import org.nixos.gradle2nix.model.ResolvedConfiguration
|
||||||
|
import org.nixos.gradle2nix.model.ResolvedDependency
|
||||||
|
|
||||||
abstract class DependencyExtractor :
|
abstract class DependencyExtractor :
|
||||||
BuildOperationListener,
|
BuildOperationListener,
|
||||||
AutoCloseable {
|
AutoCloseable {
|
||||||
|
|
||||||
|
private val configurations =
|
||||||
|
ConcurrentHashMap<
|
||||||
|
OperationIdentifier,
|
||||||
|
Pair<ResolveConfigurationDependenciesBuildOperationType.Details,
|
||||||
|
ResolveConfigurationDependenciesBuildOperationType.Result>>()
|
||||||
|
|
||||||
private val resolvedConfigurations = Collections.synchronizedList(mutableListOf<ResolvedConfiguration>())
|
private val resolvedConfigurations = Collections.synchronizedList(mutableListOf<ResolvedConfiguration>())
|
||||||
|
|
||||||
private val thrownExceptions = Collections.synchronizedList(mutableListOf<Throwable>())
|
private val thrownExceptions = Collections.synchronizedList(mutableListOf<Throwable>())
|
||||||
|
|
||||||
var rootProjectBuildDirectory: File? = null
|
var rootProjectBuildDirectory: File? = null
|
||||||
|
|
||||||
|
private val operationTracker = BuildOperationTracker()
|
||||||
|
|
||||||
// Properties are lazily initialized so that System Properties are initialized by the time
|
// Properties are lazily initialized so that System Properties are initialized by the time
|
||||||
// the values are used. This is required due to a bug in older Gradle versions. (https://github.com/gradle/gradle/issues/6825)
|
// the values are used. This is required due to a bug in older Gradle versions. (https://github.com/gradle/gradle/issues/6825)
|
||||||
private val configurationFilter by lazy {
|
private val configurationFilter by lazy {
|
||||||
@@ -52,37 +84,37 @@ abstract class DependencyExtractor :
|
|||||||
|
|
||||||
abstract fun getRendererClassName(): String
|
abstract fun getRendererClassName(): String
|
||||||
|
|
||||||
override fun started(buildOperation: BuildOperationDescriptor, startEvent: OperationStartEvent) {
|
override fun started(buildOperation: BuildOperationDescriptor, startEvent: OperationStartEvent) {}
|
||||||
// This method will never be called when registered in a `BuildServiceRegistry` (ie. Gradle 6.1 & higher)
|
|
||||||
// No-op
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun progress(operationIdentifier: OperationIdentifier, progressEvent: OperationProgressEvent) {
|
override fun progress(operationIdentifier: OperationIdentifier, progressEvent: OperationProgressEvent) {}
|
||||||
// This method will never be called when registered in a `BuildServiceRegistry` (ie. Gradle 6.1 & higher)
|
|
||||||
// No-op
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun finished(buildOperation: BuildOperationDescriptor, finishEvent: OperationFinishEvent) {
|
override fun finished(buildOperation: BuildOperationDescriptor, finishEvent: OperationFinishEvent) {
|
||||||
handleBuildOperationType<
|
operationTracker.finished(buildOperation, finishEvent)
|
||||||
|
|
||||||
|
handleFinishBuildOperationType<
|
||||||
ResolveConfigurationDependenciesBuildOperationType.Details,
|
ResolveConfigurationDependenciesBuildOperationType.Details,
|
||||||
ResolveConfigurationDependenciesBuildOperationType.Result
|
ResolveConfigurationDependenciesBuildOperationType.Result
|
||||||
>(buildOperation, finishEvent) { details, result -> extractConfigurationDependencies(details, result) }
|
>(buildOperation, finishEvent) { details, result ->
|
||||||
|
buildOperation.id?.let { operationId ->
|
||||||
|
configurations[operationId] = details to result
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private inline fun <reified D, reified R> handleBuildOperationType(
|
private inline fun <reified D, reified R> handleFinishBuildOperationType(
|
||||||
buildOperation: BuildOperationDescriptor,
|
buildOperation: BuildOperationDescriptor,
|
||||||
finishEvent: OperationFinishEvent,
|
finishEvent: OperationFinishEvent,
|
||||||
handler: (details: D, result: R) -> Unit
|
handler: (details: D, result: R) -> Unit
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
handleBuildOperationTypeRaw<D, R>(buildOperation, finishEvent, handler)
|
handleFinishBuildOperationTypeRaw<D, R>(buildOperation, finishEvent, handler)
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
thrownExceptions.add(e)
|
thrownExceptions.add(e)
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private inline fun <reified D, reified R> handleBuildOperationTypeRaw(
|
private inline fun <reified D, reified R> handleFinishBuildOperationTypeRaw(
|
||||||
buildOperation: BuildOperationDescriptor,
|
buildOperation: BuildOperationDescriptor,
|
||||||
finishEvent: OperationFinishEvent,
|
finishEvent: OperationFinishEvent,
|
||||||
handler: (details: D, result: R) -> Unit
|
handler: (details: D, result: R) -> Unit
|
||||||
@@ -101,13 +133,28 @@ abstract class DependencyExtractor :
|
|||||||
handler(details, result)
|
handler(details, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This returns null for the root build, because the build operation won't complete until after close() is called.
|
||||||
|
private fun findBuildDetails(buildOperationId: OperationIdentifier?): LoadBuildBuildOperationType.Details? {
|
||||||
|
return operationTracker.findParent(buildOperationId) {
|
||||||
|
it.details as? LoadBuildBuildOperationType.Details
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun processConfigurations() {
|
||||||
|
for ((operationId, data) in configurations) {
|
||||||
|
val (details, result) = data
|
||||||
|
extractConfigurationDependencies(operationId, details, result)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun extractConfigurationDependencies(
|
private fun extractConfigurationDependencies(
|
||||||
|
operationId: OperationIdentifier,
|
||||||
details: ResolveConfigurationDependenciesBuildOperationType.Details,
|
details: ResolveConfigurationDependenciesBuildOperationType.Details,
|
||||||
result: ResolveConfigurationDependenciesBuildOperationType.Result
|
result: ResolveConfigurationDependenciesBuildOperationType.Result
|
||||||
) {
|
) {
|
||||||
val repositories = details.repositories?.mapNotNull {
|
val repositories = details.repositories?.mapNotNull {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
Repository(
|
(Repository(
|
||||||
id = it.id,
|
id = it.id,
|
||||||
type = enumValueOf(it.type),
|
type = enumValueOf(it.type),
|
||||||
name = it.name,
|
name = it.name,
|
||||||
@@ -115,35 +162,53 @@ abstract class DependencyExtractor :
|
|||||||
metadataSources = (it.properties["METADATA_SOURCES"] as? List<String>) ?: emptyList(),
|
metadataSources = (it.properties["METADATA_SOURCES"] as? List<String>) ?: emptyList(),
|
||||||
metadataResources = metadataResources(it),
|
metadataResources = metadataResources(it),
|
||||||
artifactResources = artifactResources(it),
|
artifactResources = artifactResources(it),
|
||||||
)
|
))
|
||||||
} ?: emptyList()
|
} ?: emptyList()
|
||||||
|
|
||||||
|
if (repositories.isEmpty()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val rootComponent = result.rootComponent
|
val rootComponent = result.rootComponent
|
||||||
|
|
||||||
if (rootComponent.dependencies.isEmpty()) {
|
if (rootComponent.dependencies.isEmpty()) {
|
||||||
// No dependencies to extract: can safely ignore
|
// No dependencies to extract: can safely ignore
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val projectIdentityPath = (rootComponent.id as? DefaultProjectComponentIdentifier)?.identityPath?.path
|
|
||||||
|
|
||||||
// TODO: At this point, any resolution not bound to a particular project will be assigned to the root "build :"
|
val source: DependencySource = when {
|
||||||
// This is because `details.buildPath` is always ':', which isn't correct in a composite build.
|
details.isScriptConfiguration -> {
|
||||||
// It is possible to do better. By tracking the current build operation context, we can assign more precisely.
|
val parent = operationTracker.findParent(operationId) {
|
||||||
// See the Gradle Enterprise Build Scan Plugin: `ConfigurationResolutionCapturer_5_0`
|
it.details as? ApplyScriptPluginBuildOperationType.Details
|
||||||
val rootPath = projectIdentityPath ?: details.buildPath
|
} ?: throw IllegalStateException("Couldn't find parent script operation for ${details.configurationName}")
|
||||||
|
DependencySource(
|
||||||
if (!configurationFilter.include(rootPath, details.configurationName)) {
|
targetType = when (parent.targetType) {
|
||||||
LOGGER.debug("Ignoring resolved configuration: $rootPath - ${details.configurationName}")
|
ConfigurationTargetIdentifier.Type.GRADLE.label -> ConfigurationTarget.GRADLE
|
||||||
return
|
ConfigurationTargetIdentifier.Type.SETTINGS.label -> ConfigurationTarget.SETTINGS
|
||||||
|
ConfigurationTargetIdentifier.Type.PROJECT.label -> ConfigurationTarget.BUILDSCRIPT
|
||||||
|
else -> throw IllegalStateException("Unknown configuration target type: ${parent.targetType}")
|
||||||
|
},
|
||||||
|
targetPath = parent.targetPath ?: ":",
|
||||||
|
buildPath = parent.buildPath!!
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
DependencySource(
|
||||||
|
targetType = ConfigurationTarget.PROJECT,
|
||||||
|
targetPath = details.projectPath!!,
|
||||||
|
buildPath = details.buildPath
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val rootId = if (projectIdentityPath == null) "build $rootPath" else componentId(rootComponent)
|
|
||||||
val rootSource = DependencySource(rootId, rootPath)
|
val resolvedConfiguration = ResolvedConfiguration(source, details.configurationName, repositories)
|
||||||
val resolvedConfiguration = ResolvedConfiguration(rootSource, details.configurationName, repositories)
|
|
||||||
|
|
||||||
for (directDependency in getResolvedDependencies(rootComponent)) {
|
for (directDependency in getResolvedDependencies(rootComponent)) {
|
||||||
|
val moduleComponentId = directDependency.id as? ModuleComponentIdentifier ?: continue
|
||||||
val directDep = createComponentNode(
|
val directDep = createComponentNode(
|
||||||
componentId(directDependency),
|
moduleComponentId,
|
||||||
rootSource,
|
source,
|
||||||
true,
|
true,
|
||||||
directDependency,
|
directDependency,
|
||||||
result.getRepositoryId(directDependency)
|
result.getRepositoryId(directDependency)
|
||||||
@@ -167,16 +232,18 @@ abstract class DependencyExtractor :
|
|||||||
|
|
||||||
val dependencyComponents = getResolvedDependencies(component)
|
val dependencyComponents = getResolvedDependencies(component)
|
||||||
for (dependencyComponent in dependencyComponents) {
|
for (dependencyComponent in dependencyComponents) {
|
||||||
val dependencyId = componentId(dependencyComponent)
|
if (!resolvedConfiguration.hasDependency(componentId(dependencyComponent))) {
|
||||||
if (!resolvedConfiguration.hasDependency(dependencyId)) {
|
val moduleComponentId = dependencyComponent.id as? ModuleComponentIdentifier
|
||||||
val dependencyNode = createComponentNode(
|
if (moduleComponentId != null) {
|
||||||
dependencyId,
|
val dependencyNode = createComponentNode(
|
||||||
componentSource,
|
moduleComponentId,
|
||||||
direct,
|
componentSource,
|
||||||
dependencyComponent,
|
direct,
|
||||||
result.getRepositoryId(component)
|
dependencyComponent,
|
||||||
)
|
result.getRepositoryId(component)
|
||||||
resolvedConfiguration.addDependency(dependencyNode)
|
)
|
||||||
|
resolvedConfiguration.addDependency(dependencyNode)
|
||||||
|
}
|
||||||
|
|
||||||
walkComponentDependencies(result, dependencyComponent, componentSource, resolvedConfiguration)
|
walkComponentDependencies(result, dependencyComponent, componentSource, resolvedConfiguration)
|
||||||
}
|
}
|
||||||
@@ -186,24 +253,40 @@ abstract class DependencyExtractor :
|
|||||||
private fun getSource(component: ResolvedComponentResult, source: DependencySource): DependencySource {
|
private fun getSource(component: ResolvedComponentResult, source: DependencySource): DependencySource {
|
||||||
val componentId = component.id
|
val componentId = component.id
|
||||||
if (componentId is DefaultProjectComponentIdentifier) {
|
if (componentId is DefaultProjectComponentIdentifier) {
|
||||||
return DependencySource(componentId(component), componentId.identityPath.path)
|
return DependencySource(
|
||||||
|
ConfigurationTarget.PROJECT,
|
||||||
|
componentId.projectPath,
|
||||||
|
componentId.build.buildPathCompat
|
||||||
|
)
|
||||||
}
|
}
|
||||||
return source
|
return source
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val BuildIdentifier.buildPathCompat: String
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
get() = if (GradleVersion.current() < GradleVersion.version("8.2")) name else buildPath
|
||||||
|
|
||||||
private fun getResolvedDependencies(component: ResolvedComponentResult): List<ResolvedComponentResult> {
|
private fun getResolvedDependencies(component: ResolvedComponentResult): List<ResolvedComponentResult> {
|
||||||
return component.dependencies.filterIsInstance<ResolvedDependencyResult>().map { it.selected }.filter { it != component }
|
return component.dependencies.filterIsInstance<ResolvedDependencyResult>().map { it.selected }.filter { it != component }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createComponentNode(componentId: String, source: DependencySource, direct: Boolean, component: ResolvedComponentResult, repositoryId: String?): ResolvedDependency {
|
private fun createComponentNode(
|
||||||
val componentDependencies = component.dependencies.filterIsInstance<ResolvedDependencyResult>().map { componentId(it.selected) }
|
componentId: ModuleComponentIdentifier,
|
||||||
|
source: DependencySource,
|
||||||
|
direct: Boolean,
|
||||||
|
component: ResolvedComponentResult,
|
||||||
|
repositoryId: String?
|
||||||
|
): ResolvedDependency {
|
||||||
|
val componentDependencies =
|
||||||
|
component.dependencies.filterIsInstance<ResolvedDependencyResult>().map { componentId(it.selected) }
|
||||||
|
val coordinates = coordinates(componentId)
|
||||||
return ResolvedDependency(
|
return ResolvedDependency(
|
||||||
componentId,
|
componentId.displayName,
|
||||||
source,
|
source,
|
||||||
direct,
|
direct,
|
||||||
coordinates(component),
|
coordinates,
|
||||||
repositoryId,
|
repositoryId,
|
||||||
componentDependencies
|
componentDependencies,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,16 +294,25 @@ abstract class DependencyExtractor :
|
|||||||
return component.id.displayName
|
return component.id.displayName
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun coordinates(component: ResolvedComponentResult): DependencyCoordinates {
|
private fun coordinates(componentId: ModuleComponentIdentifier): DependencyCoordinates {
|
||||||
// TODO: Consider and handle null moduleVersion
|
|
||||||
val moduleVersionIdentifier = component.moduleVersion!!
|
|
||||||
return DependencyCoordinates(
|
return DependencyCoordinates(
|
||||||
moduleVersionIdentifier.group,
|
componentId.group,
|
||||||
moduleVersionIdentifier.name,
|
componentId.module,
|
||||||
moduleVersionIdentifier.version
|
componentId.version,
|
||||||
|
(componentId as? MavenUniqueSnapshotComponentIdentifier)?.timestamp
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun artifactType(type: Class<out Artifact>): ResolvedArtifact.Type? {
|
||||||
|
return when (type) {
|
||||||
|
SourcesArtifact::class.java -> ResolvedArtifact.Type.SOURCES
|
||||||
|
JavadocArtifact::class.java -> ResolvedArtifact.Type.JAVADOC
|
||||||
|
IvyDescriptorArtifact::class.java -> ResolvedArtifact.Type.IVY_DESCRIPTOR
|
||||||
|
MavenPomArtifact::class.java -> ResolvedArtifact.Type.MAVEN_POM
|
||||||
|
else -> null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun writeDependencyGraph() {
|
private fun writeDependencyGraph() {
|
||||||
val outputDirectory = getOutputDir()
|
val outputDirectory = getOutputDir()
|
||||||
outputDirectory.mkdirs()
|
outputDirectory.mkdirs()
|
||||||
@@ -248,6 +340,8 @@ abstract class DependencyExtractor :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun close() {
|
override fun close() {
|
||||||
|
LOGGER.lifecycle("DependencyExtractor: CLOSE")
|
||||||
|
|
||||||
if (thrownExceptions.isNotEmpty()) {
|
if (thrownExceptions.isNotEmpty()) {
|
||||||
throw DefaultMultiCauseException(
|
throw DefaultMultiCauseException(
|
||||||
"The Gradle2Nix plugin encountered errors while extracting dependencies. " +
|
"The Gradle2Nix plugin encountered errors while extracting dependencies. " +
|
||||||
@@ -256,6 +350,10 @@ abstract class DependencyExtractor :
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
processConfigurations()
|
||||||
|
|
||||||
|
LOGGER.lifecycle("Resolved ${resolvedConfigurations.size} configurations.")
|
||||||
|
|
||||||
writeDependencyGraph()
|
writeDependencyGraph()
|
||||||
} catch (e: RuntimeException) {
|
} catch (e: RuntimeException) {
|
||||||
throw GradleException(
|
throw GradleException(
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ abstract class DependencyExtractorBuildService :
|
|||||||
DependencyExtractor(),
|
DependencyExtractor(),
|
||||||
BuildService<DependencyExtractorBuildService.Params>
|
BuildService<DependencyExtractorBuildService.Params>
|
||||||
{
|
{
|
||||||
// Some parameters for the web server
|
|
||||||
internal interface Params : BuildServiceParameters {
|
internal interface Params : BuildServiceParameters {
|
||||||
val rendererClassName: Property<String>
|
val rendererClassName: Property<String>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package org.nixos.gradle2nix.dependencygraph.util
|
||||||
|
|
||||||
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
import org.gradle.api.logging.Logging
|
||||||
|
import org.gradle.internal.operations.BuildOperation
|
||||||
|
import org.gradle.internal.operations.BuildOperationDescriptor
|
||||||
|
import org.gradle.internal.operations.BuildOperationListener
|
||||||
|
import org.gradle.internal.operations.OperationFinishEvent
|
||||||
|
import org.gradle.internal.operations.OperationIdentifier
|
||||||
|
import org.gradle.internal.operations.OperationProgressEvent
|
||||||
|
import org.gradle.internal.operations.OperationStartEvent
|
||||||
|
|
||||||
|
class BuildOperationTracker : BuildOperationListener {
|
||||||
|
private val _parents: MutableMap<OperationIdentifier, OperationIdentifier?> = ConcurrentHashMap()
|
||||||
|
private val _operations: MutableMap<OperationIdentifier, BuildOperationDescriptor> = ConcurrentHashMap()
|
||||||
|
private val _results: MutableMap<OperationIdentifier, Any> = ConcurrentHashMap()
|
||||||
|
|
||||||
|
val parents: Map<OperationIdentifier, OperationIdentifier?> get() = _parents
|
||||||
|
val operations: Map<OperationIdentifier, BuildOperationDescriptor> get() = _operations
|
||||||
|
val results: Map<OperationIdentifier, Any> get() = _results
|
||||||
|
|
||||||
|
override fun started(buildOperation: BuildOperationDescriptor, startEvent: OperationStartEvent) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun progress(operationIdentifier: OperationIdentifier, progressEvent: OperationProgressEvent) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun finished(buildOperation: BuildOperationDescriptor, finishEvent: OperationFinishEvent) {
|
||||||
|
val id = buildOperation.id ?: return
|
||||||
|
_parents[id] = buildOperation.parentId
|
||||||
|
_operations[id] = buildOperation
|
||||||
|
}
|
||||||
|
|
||||||
|
tailrec fun <T> findParent(id: OperationIdentifier?, block: (BuildOperationDescriptor) -> T?): T? {
|
||||||
|
if (id == null) return null
|
||||||
|
val operation = _operations[id] ?: return null.also {
|
||||||
|
LOGGER.lifecycle("no operation for $id")
|
||||||
|
}
|
||||||
|
return block(operation) ?: findParent(operation.parentId, block)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> findChild(id: OperationIdentifier?, block: (BuildOperationDescriptor) -> T?): T? {
|
||||||
|
if (id == null) return null
|
||||||
|
val operation = operations[id] ?: return null
|
||||||
|
block(operation)?.let { return it }
|
||||||
|
return children(id).firstNotNullOfOrNull { findChild(it, block) }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun children(id: OperationIdentifier): Set<OperationIdentifier> {
|
||||||
|
return parents.filterValues { it == id }.keys
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified T> getDetails(id: OperationIdentifier): T? {
|
||||||
|
return operations[id]?.details as? T
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified T> getResult(id: OperationIdentifier): T? {
|
||||||
|
return results[id] as? T
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val LOGGER = Logging.getLogger(BuildOperationTracker::class.qualifiedName!!)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@ import org.gradle.api.Task
|
|||||||
import org.gradle.api.invocation.Gradle
|
import org.gradle.api.invocation.Gradle
|
||||||
import org.gradle.api.tasks.TaskProvider
|
import org.gradle.api.tasks.TaskProvider
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
import org.nixos.gradle2nix.RESOLVE_ALL_TASK
|
import org.nixos.gradle2nix.model.RESOLVE_ALL_TASK
|
||||||
import org.nixos.gradle2nix.RESOLVE_PROJECT_TASK
|
import org.nixos.gradle2nix.model.RESOLVE_PROJECT_TASK
|
||||||
|
|
||||||
// TODO: Rename these
|
// TODO: Rename these
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user