Redesign env hierarchy

This commit is contained in:
Tad Fisher
2023-10-15 19:39:40 -07:00
parent 121e512a06
commit 6da87262a4
30 changed files with 4987 additions and 3300 deletions

View File

@@ -1,9 +0,0 @@
package org.nixos.gradle2nix
import kotlinx.serialization.Serializable
@Serializable
data class Artifact(
val urls: List<String>,
val hash: String,
)

View File

@@ -9,6 +9,14 @@ class Logger(
val stacktrace: Boolean = false val stacktrace: Boolean = false
) { ) {
fun debug(message: String, error: Throwable? = null) {
if (!stacktrace) return
out.println(message)
if (error == null) return
error.message?.let { println(" Cause: $it") }
error.printStackTrace(out)
}
fun log(message: String, error: Throwable? = null) { fun log(message: String, error: Throwable? = null) {
if (!verbose) return if (!verbose) return
out.println(message) out.println(message)

View File

@@ -74,6 +74,9 @@ class Gradle2Nix : CliktCommand(
help = "Prefix for environment files (.json and .nix)") help = "Prefix for environment files (.json and .nix)")
.default("gradle-env") .default("gradle-env")
private val debug: Boolean by option("--debug", help = "Enable debug logging")
.flag(default = false)
private val quiet: Boolean by option("--quiet", "-q", help = "Disable logging") private val quiet: Boolean by option("--quiet", "-q", help = "Disable logging")
.flag(default = false) .flag(default = false)
@@ -114,7 +117,7 @@ class Gradle2Nix : CliktCommand(
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) val logger = Logger(verbose = !quiet, stacktrace = debug)
val config = Config( val config = Config(
File(appHome), File(appHome),
@@ -146,17 +149,17 @@ class Gradle2Nix : CliktCommand(
connection.build(config) connection.build(config)
} }
val dependencies = try { val env = try {
processDependencies(config) processDependencies(config)
} catch (e: Throwable) { } catch (e: Throwable) {
error("Dependency parsing failed: ${e.message}") logger.error("Dependency parsing failed", e)
} }
val outDir = outDir ?: projectDir val outDir = outDir ?: projectDir
val json = outDir.resolve("$envFile.json") val json = outDir.resolve("$envFile.json")
logger.log("Writing environment to $json") logger.log("Writing environment to $json")
json.outputStream().buffered().use { output -> json.outputStream().buffered().use { output ->
JsonFormat.encodeToStream(dependencies, output) JsonFormat.encodeToStream(env, output)
} }
} }
} }

View File

@@ -14,9 +14,16 @@ 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.DependencyCoordinates
import org.nixos.gradle2nix.dependencygraph.model.Repository import org.nixos.gradle2nix.dependencygraph.model.Repository
import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration
import org.nixos.gradle2nix.dependencygraph.model.ResolvedDependency
import org.nixos.gradle2nix.env.ArtifactFile
import org.nixos.gradle2nix.env.ArtifactSet
import org.nixos.gradle2nix.env.Env
import org.nixos.gradle2nix.env.Module
import org.nixos.gradle2nix.env.ModuleId
import org.nixos.gradle2nix.env.ModuleVersionId
import org.nixos.gradle2nix.env.Version
import org.nixos.gradle2nix.metadata.Checksum import org.nixos.gradle2nix.metadata.Checksum
import org.nixos.gradle2nix.metadata.Component import org.nixos.gradle2nix.metadata.Component
import org.nixos.gradle2nix.metadata.Md5 import org.nixos.gradle2nix.metadata.Md5
@@ -36,12 +43,12 @@ private fun shouldSkipRepository(repository: Repository): Boolean {
repository.metadataResources.all { it.startsWith("file:") && (m2 == null || !it.startsWith(m2)) } repository.metadataResources.all { it.startsWith("file:") && (m2 == null || !it.startsWith(m2)) }
} }
fun processDependencies(config: Config): Map<String, Map<String, Artifact>> { fun processDependencies(config: Config): Env {
val verificationMetadata = readVerificationMetadata(config) val verificationMetadata = readVerificationMetadata(config)
val verificationComponents = verificationMetadata?.components?.associateBy { val verificationComponents = verificationMetadata?.components?.associateBy {
DependencyCoordinates(it.group, it.name, it.version) ModuleVersionId(ModuleId(it.group, it.name), it.version)
} ?: emptyMap() } ?: emptyMap()
val moduleCache = mutableMapOf<DependencyCoordinates, GradleModule?>() val moduleCache = mutableMapOf<ModuleVersionId, GradleModule?>()
val configurations = readDependencyGraph(config) val configurations = readDependencyGraph(config)
val repositories = configurations val repositories = configurations
@@ -57,54 +64,53 @@ fun processDependencies(config: Config): Map<String, Map<String, Artifact>> {
} }
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 emptyMap() return Env(emptyMap())
} }
config.logger.debug("Repositories:\n ${repositories.values.joinToString("\n ")}")
return configurations.asSequence() val modules = configurations.asSequence()
.flatMap { it.allDependencies.asSequence() } .flatMap { it.allDependencies.asSequence() }
.groupBy { it.id } .filterNot { it.id.startsWith("project ") || it.repository == null || it.repository !in repositories }
.mapNotNull { (id, dependencies) -> .groupBy { ModuleId(it.coordinates.group, it.coordinates.module) }
if (id.startsWith("project ")) return@mapNotNull null .mapValues { (id, deps) ->
val deps = dependencies.toSet() val versions = deps.groupBy { Version(it.coordinates.version) }
if (deps.isEmpty()) { .mapValues { (version, deps) ->
config.logger.warn("$id: no resolved dependencies in dependency graph") val componentId = ModuleVersionId(id, version)
return@mapNotNull null val dep = MergedDependency(
id = componentId,
repositories = deps.mapNotNull { repositories[it.repository] }
)
val component = verificationComponents[componentId]
?: verifyComponentFilesInCache(config, componentId)
?: verifyComponentFilesInTestRepository(config, componentId)
val gradleModule = moduleCache.getOrPut(componentId) {
maybeGetGradleModule(config.logger, componentId, dep.repositories)
} }
val coordinates = deps.first().coordinates ArtifactSet(
val component = verificationComponents[coordinates] needsPomRedirect = repositories.values.any {
?: verifyComponentFilesInCache(config, coordinates) "mavenPom" in it.metadataSources &&
?: verifyComponentFilesInTestRepository(config, coordinates) "ignoreGradleMetadataRedirection" !in it.metadataSources
if (component == null) { },
config.logger.warn("$id: not present in metadata or cache; skipping") needsIvyRedirect = repositories.values.any {
return@mapNotNull null "ivyDescriptor" in it.metadataSources &&
} "ignoreGradleMetadataRedirection" !in it.metadataSources
},
val repoIds = dependencies.mapNotNull { it.repository } files = (component?.artifacts ?: emptyList()).associate { meta ->
if (repoIds.isEmpty()) { meta.name to ArtifactFile(
config.logger.warn("$id: no repository ids in dependency graph; skipping") urls = dep.repositories
return@mapNotNull null .flatMap { repository -> artifactUrls(componentId, meta.name, repository, gradleModule) }
}
val repos = repoIds.mapNotNull(repositories::get)
if (repos.isEmpty()) {
config.logger.warn("$id: no repositories found for repository ids $repoIds; skipping")
return@mapNotNull null
}
val gradleModule = moduleCache.getOrPut(coordinates) {
maybeGetGradleModule(config.logger, coordinates, repos)
}
id to component.artifacts.associate { meta ->
meta.name to Artifact(
urls = repos
.flatMap { repository -> artifactUrls(coordinates, meta.name, repository, gradleModule) }
.distinct(), .distinct(),
hash = meta.checksums.first().toSri() hash = meta.checksums.first().toSri()
) )
}.toSortedMap()
)
} }
.toSortedMap(Version.Comparator.reversed())
Module(versions)
} }
.sortedBy { it.first } .toSortedMap(compareBy(ModuleId::toString))
.toMap()
return Env(modules)
} }
private fun readVerificationMetadata(config: Config): VerificationMetadata? { private fun readVerificationMetadata(config: Config): VerificationMetadata? {
@@ -121,52 +127,55 @@ private fun readDependencyGraph(config: Config): List<ResolvedConfiguration> {
private fun verifyComponentFilesInCache( private fun verifyComponentFilesInCache(
config: Config, config: Config,
coordinates: DependencyCoordinates, id: ModuleVersionId,
): Component? { ): Component? {
val cacheDir = with(coordinates) { config.gradleHome.resolve("caches/modules-2/files-2.1/$group/$module/$version") } val cacheDir = with(id) { config.gradleHome.resolve("caches/modules-2/files-2.1/$group/$name/$version") }
if (!cacheDir.exists()) { if (!cacheDir.exists()) {
return null return null
} }
val verifications = cacheDir.walk().filter { it.isFile }.map { f -> val verifications = cacheDir.walk().filter { it.isFile }.map { f ->
ArtifactMetadata(f.name, sha256 = Sha256(f.sha256())) ArtifactMetadata(f.name, sha256 = Sha256(f.sha256()))
} }
config.logger.log("$coordinates: obtained artifact hashes from Gradle cache.") config.logger.log("$id: obtained artifact hashes from Gradle cache.")
return Component(coordinates, verifications.toList()) return Component(id, verifications.toList())
} }
private fun verifyComponentFilesInTestRepository( private fun verifyComponentFilesInTestRepository(
config: Config, config: Config,
coordinates: DependencyCoordinates id: ModuleVersionId
): Component? { ): Component? {
if (m2 == null) return null if (m2 == null) return null
val dir = with(coordinates) { val dir = with(id) {
File(URI.create(m2)).resolve("${group.replace(".", "/")}/$module/$version") File(URI.create(m2)).resolve("${group.replace(".", "/")}/$name/$version")
} }
if (!dir.exists()) { if (!dir.exists()) {
config.logger.log("$coordinates: not found in m2 repository; tried $dir") config.logger.log("$id: not found in m2 repository; tried $dir")
return null return null
} }
val verifications = dir.walk().filter { it.isFile && it.name.startsWith(coordinates.module) }.map { f -> val verifications = dir.walk().filter { it.isFile && it.name.startsWith(id.name) }.map { f ->
ArtifactMetadata( ArtifactMetadata(
f.name, f.name,
sha256 = Sha256(f.sha256()) sha256 = Sha256(f.sha256())
) )
} }
config.logger.log("$coordinates: obtained artifact hashes from test Maven repository.") config.logger.log("$id: obtained artifact hashes from test Maven repository.")
return Component(coordinates, verifications.toList()) return Component(id, verifications.toList())
} }
@OptIn(ExperimentalSerializationApi::class) @OptIn(ExperimentalSerializationApi::class)
private fun maybeGetGradleModule(logger: Logger, coordinates: DependencyCoordinates, repos: List<Repository>): GradleModule? { private fun maybeGetGradleModule(logger: Logger, id: ModuleVersionId, repos: List<Repository>): GradleModule? {
val filename = with(coordinates) { "$module-$version.module" } val filename = with(id) { "$name-$version.module" }
val reposWithGradleMetadata = repos
.filter { "gradleMetadata" in it.metadataSources }
.flatMap { artifactUrls(id, filename, it, null)}
for (url in repos.flatMap { artifactUrls(coordinates, filename, it, null)}) { for (url in reposWithGradleMetadata) {
try { try {
return URL(url).openStream().buffered().use { input -> return URL(url).openStream().buffered().use { input ->
JsonFormat.decodeFromStream(input) JsonFormat.decodeFromStream(input)
} }
} catch (e: SerializationException) { } catch (e: SerializationException) {
logger.error("$coordinates: failed to parse Gradle module metadata ($url)", e) logger.error("$id: failed to parse Gradle module metadata ($url)", e)
} catch (e: IOException) { } catch (e: IOException) {
// Pass // Pass
} }
@@ -192,12 +201,12 @@ private fun Checksum.toSri(): String {
} }
private fun artifactUrls( private fun artifactUrls(
coordinates: DependencyCoordinates, id: ModuleVersionId,
filename: String, filename: String,
repository: Repository, repository: Repository,
module: GradleModule? module: GradleModule?
): List<String> { ): List<String> {
val groupAsPath = coordinates.group.replace(".", "/") val groupAsPath = id.group.replace(".", "/")
val repoFilename = module?.let { m -> val repoFilename = module?.let { m ->
m.variants m.variants
@@ -207,10 +216,10 @@ private fun artifactUrls(
}?.url ?: filename }?.url ?: filename
val attributes = mutableMapOf( val attributes = mutableMapOf(
"organisation" to if (repository.m2Compatible) groupAsPath else coordinates.group, "organisation" to if (repository.m2Compatible) groupAsPath else id.group,
"module" to coordinates.module, "module" to id.name,
"revision" to coordinates.version, "revision" to id.version.toString(),
) + fileAttributes(repoFilename, coordinates.version) ) + fileAttributes(repoFilename, id.version)
val resources = when (attributes["ext"]) { val resources = when (attributes["ext"]) {
"pom" -> if ("mavenPom" in repository.metadataSources) repository.metadataResources else repository.artifactResources "pom" -> if ("mavenPom" in repository.metadataSources) repository.metadataResources else repository.artifactResources
@@ -251,7 +260,7 @@ private fun fill(template: String, attributes: Map<String, String>): String {
} }
// Gradle persists artifacts with the Maven artifact pattern, which may not match the repository's pattern. // Gradle persists artifacts with the Maven artifact pattern, which may not match the repository's pattern.
private fun fileAttributes(file: String, version: String): Map<String, String> { private fun fileAttributes(file: String, version: Version): Map<String, String> {
val parts = Regex("(.+)-$version(-([^.]+))?(\\.(.+))?").matchEntire(file) ?: return emptyMap() val parts = Regex("(.+)-$version(-([^.]+))?(\\.(.+))?").matchEntire(file) ?: return emptyMap()
val (artifact, _, classifier, _, ext) = parts.destructured val (artifact, _, classifier, _, ext) = parts.destructured
@@ -262,3 +271,8 @@ private fun fileAttributes(file: String, version: String): Map<String, String> {
put("ext", ext) put("ext", ext)
} }
} }
private data class MergedDependency(
val id: ModuleVersionId,
val repositories: List<Repository>
)

View File

@@ -0,0 +1,233 @@
package org.nixos.gradle2nix.env
import java.util.concurrent.ConcurrentHashMap
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationException
import kotlinx.serialization.descriptors.PrimitiveKind
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import org.gradle.internal.impldep.com.google.common.collect.ImmutableMap
import org.gradle.internal.impldep.com.google.common.primitives.Longs
@Serializable
@JvmInline
value class Env(
val modules: Map<ModuleId, Module>,
)
@Serializable
@JvmInline
value class Module(
val versions: Map<Version, ArtifactSet>,
)
@Serializable
data class ArtifactSet(
val needsPomRedirect: Boolean,
val needsIvyRedirect: Boolean,
val files: Map<String, ArtifactFile>
)
@Serializable
data class ArtifactFile(
val urls: List<String>,
val hash: String,
)
@Serializable(ModuleId.Serializer::class)
data class ModuleId(
val group: String,
val name: String,
) {
override fun toString(): String = "$group:$name"
companion object Serializer : KSerializer<ModuleId> {
override val descriptor: SerialDescriptor get() = PrimitiveSerialDescriptor(
ModuleId::class.qualifiedName!!,
PrimitiveKind.STRING
)
override fun serialize(encoder: Encoder, value: ModuleId) {
encoder.encodeString("${value.name}:${value.group}")
}
override fun deserialize(decoder: Decoder): ModuleId {
val encoded = decoder.decodeString()
val parts = encoded.split(":")
if (parts.size != 2 || parts.any(String::isBlank)) {
throw SerializationException("invalid module id: $encoded")
}
return ModuleId(parts[0], parts[1])
}
}
}
data class ModuleVersionId(
val moduleId: ModuleId,
val version: Version
) {
val group: String get() = moduleId.group
val name: String get() = moduleId.name
override fun toString(): String = "$moduleId:$version"
}
@Serializable(Version.Serializer::class)
class Version(val source: String, val parts: List<String>, base: Version?) : Comparable<Version> {
val base: Version
val numericParts: List<Long?>
init {
this.base = base ?: this
this.numericParts = parts.map(Longs::tryParse)
}
override fun compareTo(other: Version): Int = compare(this, other)
override fun toString(): String = source
override fun equals(other: Any?): Boolean = when {
other === this -> true
other == null || other !is Version -> false
else -> source == other.source
}
override fun hashCode(): Int = source.hashCode()
object Comparator : kotlin.Comparator<Version> {
override fun compare(o1: Version, o2: Version): Int =
Version.compare(o1, o2)
}
internal object Serializer : KSerializer<Version> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(
Version::class.qualifiedName!!,
PrimitiveKind.STRING
)
override fun serialize(encoder: Encoder, value: Version) {
encoder.encodeString(value.source)
}
override fun deserialize(decoder: Decoder): Version {
return Version(decoder.decodeString())
}
}
companion object {
private val SPECIAL_MEANINGS: Map<String, Int> = ImmutableMap.builderWithExpectedSize<String, Int>(7)
.put("dev", -1)
.put("rc", 1)
.put("snapshot", 2)
.put("final", 3).put("ga", 4).put("release", 5)
.put("sp", 6).build()
private val cache = ConcurrentHashMap<String, Version>()
// From org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionParser
operator fun invoke(original: String): Version = cache.getOrPut(original) {
val parts = mutableListOf<String>()
var digit = false
var startPart = 0
var pos = 0
var endBase = 0
var endBaseStr = 0
while (pos < original.length) {
val ch = original[pos]
if (ch == '.' || ch == '_' || ch == '-' || ch == '+') {
parts.add(original.substring(startPart, pos))
startPart = pos + 1
digit = false
if (ch != '.' && endBaseStr == 0) {
endBase = parts.size
endBaseStr = pos
}
} else if (ch in '0'..'9') {
if (!digit && pos > startPart) {
if (endBaseStr == 0) {
endBase = parts.size + 1
endBaseStr = pos
}
parts.add(original.substring(startPart, pos))
startPart = pos
}
digit = true
} else {
if (digit) {
if (endBaseStr == 0) {
endBase = parts.size + 1
endBaseStr = pos
}
parts.add(original.substring(startPart, pos))
startPart = pos
}
digit = false
}
pos++
}
if (pos > startPart) {
parts.add(original.substring(startPart, pos))
}
var base: Version? = null
if (endBaseStr > 0) {
base = Version(original.substring(0, endBaseStr), parts.subList(0, endBase), null)
}
Version(original, parts, base)
}
// From org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.StaticVersionComparator
private fun compare(version1: Version, version2: Version): Int {
if (version1 == version2) {
return 0
}
val parts1 = version1.parts
val parts2 = version2.parts
val numericParts1 = version1.numericParts
val numericParts2 = version2.numericParts
var lastIndex = -1
for (i in 0..<(minOf(parts1.size, parts2.size))) {
lastIndex = i
val part1 = parts1[i]
val part2 = parts2[i]
val numericPart1 = numericParts1[i]
val numericPart2 = numericParts2[i]
when {
part1 == part2 -> continue
numericPart1 != null && numericPart2 == null -> return 1
numericPart2 != null && numericPart1 == null -> return -1
numericPart1 != null && numericPart2 != null -> {
val result = numericPart1.compareTo(numericPart2)
if (result == 0) continue
return result
}
else -> {
// both are strings, we compare them taking into account special meaning
val sm1 = SPECIAL_MEANINGS[part1.lowercase()]
val sm2 = SPECIAL_MEANINGS[part2.lowercase()]
if (sm1 != null) return sm1 - (sm2 ?: 0)
if (sm2 != null) return -sm2
return part1.compareTo(part2)
}
}
}
if (lastIndex < parts1.size) {
return if (numericParts1[lastIndex] == null) -1 else 1
}
if (lastIndex < parts2.size) {
return if (numericParts2[lastIndex] == null) 1 else -1
}
return 0
}
}
}

View File

@@ -9,7 +9,9 @@ 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 org.nixos.gradle2nix.Logger import org.nixos.gradle2nix.Logger
import org.nixos.gradle2nix.dependencygraph.model.DependencyCoordinates import org.nixos.gradle2nix.DependencyCoordinates
import org.nixos.gradle2nix.env.ModuleVersionId
import org.nixos.gradle2nix.env.Version
sealed interface Coordinates { sealed interface Coordinates {
val group: String? val group: String?
@@ -103,13 +105,13 @@ data class Artifact(
data class Component( data class Component(
val group: String, val group: String,
val name: String, val name: String,
val version: String, val version: Version,
val artifacts: List<Artifact> = emptyList(), val artifacts: List<Artifact> = emptyList(),
) { ) {
constructor(coordinates: DependencyCoordinates, artifacts: List<Artifact>) : this( constructor(id: ModuleVersionId, artifacts: List<Artifact>) : this(
coordinates.group, id.group,
coordinates.module, id.name,
coordinates.version, id.version,
artifacts artifacts
) )
} }

View File

@@ -5,30 +5,24 @@ import io.kotest.common.ExperimentalKotest
import io.kotest.common.KotestInternal import io.kotest.common.KotestInternal
import io.kotest.core.names.TestName import io.kotest.core.names.TestName
import io.kotest.core.source.sourceRef import io.kotest.core.source.sourceRef
import io.kotest.core.spec.style.scopes.ContainerScope
import io.kotest.core.spec.style.scopes.RootScope
import io.kotest.core.test.NestedTest import io.kotest.core.test.NestedTest
import io.kotest.core.test.TestScope import io.kotest.core.test.TestScope
import io.kotest.core.test.TestType import io.kotest.core.test.TestType
import io.kotest.extensions.system.withEnvironment
import io.kotest.matchers.equals.beEqual import io.kotest.matchers.equals.beEqual
import io.kotest.matchers.equals.shouldBeEqual
import io.kotest.matchers.file.shouldBeAFile import io.kotest.matchers.file.shouldBeAFile
import io.kotest.matchers.paths.shouldBeAFile
import io.kotest.matchers.should import io.kotest.matchers.should
import java.io.File import java.io.File
import java.io.FileFilter import java.io.FileFilter
import java.nio.file.Files import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths import java.nio.file.Paths
import kotlin.io.path.createTempDirectory
import kotlin.io.path.inputStream
import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.SerializationException import kotlinx.serialization.SerializationException
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json import kotlinx.serialization.json.Json
import kotlinx.serialization.json.decodeFromStream import kotlinx.serialization.json.decodeFromStream
import kotlinx.serialization.json.encodeToStream import kotlinx.serialization.json.encodeToStream
import okio.use import okio.use
import org.nixos.gradle2nix.env.Env
private val app = Gradle2Nix() private val app = Gradle2Nix()
@@ -48,7 +42,7 @@ fun fixture(path: String): File {
suspend fun TestScope.fixture( suspend fun TestScope.fixture(
project: String, project: String,
vararg args: String, vararg args: String,
test: suspend TestScope.(Map<String, Map<String, Artifact>>) -> Unit test: suspend TestScope.(Env) -> Unit
) { ) {
val tmp = Paths.get("build/tmp/gradle2nix").apply { toFile().mkdirs() } val tmp = Paths.get("build/tmp/gradle2nix").apply { toFile().mkdirs() }
val baseDir = Paths.get("../fixtures", project).toFile() val baseDir = Paths.get("../fixtures", project).toFile()
@@ -82,7 +76,7 @@ suspend fun TestScope.fixture(
app.main(listOf("-d", tempDir.toString()) + args.withM2()) app.main(listOf("-d", tempDir.toString()) + args.withM2())
val file = tempDir.resolve("${app.envFile}.json") val file = tempDir.resolve("${app.envFile}.json")
file.shouldBeAFile() file.shouldBeAFile()
val env: Map<String, Map<String, Artifact>> = file.inputStream().buffered().use { input -> val env: Env = file.inputStream().buffered().use { input ->
Json.decodeFromStream(input) Json.decodeFromStream(input)
} }
test(env) test(env)
@@ -110,14 +104,12 @@ suspend fun TestScope.golden(
if (!goldenFile.exists()) { if (!goldenFile.exists()) {
fail("Golden file '$filename' doesn't exist. Run with --update-golden to generate.") fail("Golden file '$filename' doesn't exist. Run with --update-golden to generate.")
} }
val goldenData: Map<String, Map<String, Artifact>> = try { val goldenData = try {
goldenFile.inputStream().buffered().use { input -> goldenFile.readText()
json.decodeFromStream(input)
}
} catch (e: SerializationException) { } catch (e: SerializationException) {
fail("Failed to load golden data from '$filename'. Run with --update-golden to regenerate.") fail("Failed to load golden data from '$filename'. Run with --update-golden to regenerate.")
} }
env should beEqual(goldenData) json.encodeToString(env) should beEqual(goldenData)
} }
} }
} }

View File

@@ -1,19 +1,9 @@
{ {
"com.squareup.okio:okio:2.2.2": { "com.squareup.moshi:moshi": {
"okio-2.2.2.jar": { "1.8.0": {
"urls": [ "needsPomRedirect": true,
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar" "needsIvyRedirect": false,
], "files": {
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
],
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
}
},
"com.squareup.moshi:moshi:1.8.0": {
"moshi-1.8.0.jar": { "moshi-1.8.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar" "https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
@@ -26,8 +16,34 @@
], ],
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8=" "hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
} }
}
}
}, },
"org.jetbrains.kotlin:kotlin-stdlib:1.2.60": { "com.squareup.okio:okio": {
"2.2.2": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"okio-2.2.2.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
],
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"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": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-1.2.60.jar": { "kotlin-stdlib-1.2.60.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar" "https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
@@ -40,8 +56,14 @@
], ],
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg=" "hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
} }
}
}
}, },
"org.jetbrains.kotlin:kotlin-stdlib-common:1.2.60": { "org.jetbrains.kotlin:kotlin-stdlib-common": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-common-1.2.60.jar": { "kotlin-stdlib-common-1.2.60.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar" "https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
@@ -54,8 +76,14 @@
], ],
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE=" "hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
} }
}
}
}, },
"org.jetbrains:annotations:13.0": { "org.jetbrains:annotations": {
"13.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"annotations-13.0.jar": { "annotations-13.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar" "https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
@@ -70,3 +98,5 @@
} }
} }
} }
}
}

View File

@@ -1,19 +1,9 @@
{ {
"com.squareup.okio:okio:2.2.2": { "com.squareup.moshi:moshi": {
"okio-2.2.2.jar": { "1.8.0": {
"urls": [ "needsPomRedirect": true,
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar" "needsIvyRedirect": false,
], "files": {
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
],
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
}
},
"com.squareup.moshi:moshi:1.8.0": {
"moshi-1.8.0.jar": { "moshi-1.8.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar" "https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
@@ -26,8 +16,34 @@
], ],
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8=" "hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
} }
}
}
}, },
"org.jetbrains.kotlin:kotlin-stdlib:1.2.60": { "com.squareup.okio:okio": {
"2.2.2": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"okio-2.2.2.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
],
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"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": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-1.2.60.jar": { "kotlin-stdlib-1.2.60.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar" "https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
@@ -40,8 +56,14 @@
], ],
"hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg=" "hash": "sha256-5jKJkgnmtMqrlA/YLk7GOjLjJkP4Fff6cJdkeJDXnxg="
} }
}
}
}, },
"org.jetbrains.kotlin:kotlin-stdlib-common:1.2.60": { "org.jetbrains.kotlin:kotlin-stdlib-common": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-common-1.2.60.jar": { "kotlin-stdlib-common-1.2.60.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar" "https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
@@ -54,8 +76,14 @@
], ],
"hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE=" "hash": "sha256-gwwnrx4c8k8PUm6kV5AcQ/OMGbtvfl03Y8PSU98bjaE="
} }
}
}
}, },
"org.jetbrains:annotations:13.0": { "org.jetbrains:annotations": {
"13.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"annotations-13.0.jar": { "annotations-13.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar" "https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
@@ -70,3 +98,5 @@
} }
} }
} }
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,9 @@
{ {
"com.badlogicgames.gdx:gdx-platform:1.9.9": { "com.badlogicgames.gdx:gdx-platform": {
"1.9.9": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"gdx-platform-1.9.9-natives-desktop.jar": { "gdx-platform-1.9.9-natives-desktop.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar" "https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar"
@@ -14,3 +18,5 @@
} }
} }
} }
}
}

View File

@@ -1,5 +1,9 @@
{ {
"com.badlogicgames.gdx:gdx-platform:1.9.9": { "com.badlogicgames.gdx:gdx-platform": {
"1.9.9": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"gdx-platform-1.9.9-natives-desktop.jar": { "gdx-platform-1.9.9-natives-desktop.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar" "https://repo.maven.apache.org/maven2/com/badlogicgames/gdx/gdx-platform/1.9.9/gdx-platform-1.9.9-natives-desktop.jar"
@@ -14,3 +18,5 @@
} }
} }
} }
}
}

View File

@@ -1,13 +1,23 @@
{ {
"io.micrometer:micrometer-bom:1.5.1": { "io.micrometer:micrometer-bom": {
"1.5.1": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"micrometer-bom-1.5.1.pom": { "micrometer-bom-1.5.1.pom": {
"urls": [ "urls": [
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-bom/1.5.1/micrometer-bom-1.5.1.pom" "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=" "hash": "sha256-K/qF6ds8ck5sWvelJBYk+w+K04oQpT/4BtY57WVLRUI="
} }
}
}
}, },
"io.micrometer:micrometer-core:1.5.1": { "io.micrometer:micrometer-core": {
"1.5.1": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"micrometer-core-1.5.1.jar": { "micrometer-core-1.5.1.jar": {
"urls": [ "urls": [
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-core/1.5.1/micrometer-core-1.5.1.jar" "file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/io/micrometer/micrometer-core/1.5.1/micrometer-core-1.5.1.jar"
@@ -20,8 +30,14 @@
], ],
"hash": "sha256-Cb4KaUHaOvdOz7VpDax6kJKuT2KWY5Ci73foX2xl6xw=" "hash": "sha256-Cb4KaUHaOvdOz7VpDax6kJKuT2KWY5Ci73foX2xl6xw="
} }
}
}
}, },
"org.hdrhistogram:HdrHistogram:2.1.12": { "org.hdrhistogram:HdrHistogram": {
"2.1.12": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"HdrHistogram-2.1.12.jar": { "HdrHistogram-2.1.12.jar": {
"urls": [ "urls": [
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar" "file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar"
@@ -36,3 +52,5 @@
} }
} }
} }
}
}

View File

@@ -1,5 +1,9 @@
{ {
"org.apache:test-SNAPSHOT1:2.0.2-SNAPSHOT:20070310.181613-3": { "org.apache:test-SNAPSHOT1": {
"2.0.2-SNAPSHOT": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": { "test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": {
"urls": [ "urls": [
], ],
@@ -12,3 +16,5 @@
} }
} }
} }
}
}

View File

@@ -1,5 +1,9 @@
{ {
"org.apache:test-SNAPSHOT1:2.0.2-SNAPSHOT:20070310.181613-3": { "org.apache:test-SNAPSHOT1": {
"2.0.2-SNAPSHOT": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": { "test-SNAPSHOT1-2.0.2-20070310.181613-3.jar": {
"urls": [ "urls": [
], ],
@@ -12,3 +16,5 @@
} }
} }
} }
}
}

View File

@@ -1,16 +1,22 @@
{ {
"com.github.anuken:packr:-SNAPSHOT:packr-1.2-g034efe5-114": { "com.github.anuken:packr": {
"packr--SNAPSHOT.pom": { "-SNAPSHOT": {
"urls": [ "needsPomRedirect": true,
"https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.pom" "needsIvyRedirect": false,
], "files": {
"hash": "sha256-xP28J7blX1IzuJxD4u/wy1ZbwAT5RAajBcpBWs1fAxU="
},
"packr--SNAPSHOT.jar": { "packr--SNAPSHOT.jar": {
"urls": [ "urls": [
"https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.jar" "https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.jar"
], ],
"hash": "sha256-XrfVZLc7efr2n3Bz6mOw8DkRI0T8rU8B/MKUMVDl71w=" "hash": "sha256-XrfVZLc7efr2n3Bz6mOw8DkRI0T8rU8B/MKUMVDl71w="
},
"packr--SNAPSHOT.pom": {
"urls": [
"https://jitpack.io/com/github/anuken/packr/-SNAPSHOT/packr--SNAPSHOT.pom"
],
"hash": "sha256-xP28J7blX1IzuJxD4u/wy1ZbwAT5RAajBcpBWs1fAxU="
}
}
} }
} }
} }

View File

@@ -1,5 +1,9 @@
{ {
"org.apache:test-SNAPSHOT2:2.0.2-SNAPSHOT": { "org.apache:test-SNAPSHOT2": {
"2.0.2-SNAPSHOT": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": { "test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": {
"urls": [ "urls": [
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar" "file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar"
@@ -14,3 +18,5 @@
} }
} }
} }
}
}

View File

@@ -1,5 +1,9 @@
{ {
"org.apache:test-SNAPSHOT2:2.0.2-SNAPSHOT": { "org.apache:test-SNAPSHOT2": {
"2.0.2-SNAPSHOT": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": { "test-SNAPSHOT2-2.0.2-SNAPSHOT.jar": {
"urls": [ "urls": [
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar" "file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test-SNAPSHOT2/2.0.2-SNAPSHOT/test-SNAPSHOT2-2.0.2-SNAPSHOT.jar"
@@ -14,3 +18,5 @@
} }
} }
} }
}
}

View File

@@ -1,47 +1,9 @@
{ {
"gradle.plugin.net.vivin:gradle-semantic-build-versioning:4.0.0": { "com.googlecode.javaewah:JavaEWAH": {
"gradle-semantic-build-versioning-4.0.0.jar": { "1.1.6": {
"urls": [ "needsPomRedirect": true,
"https://plugins.gradle.org/m2/gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0/gradle-semantic-build-versioning-4.0.0.jar" "needsIvyRedirect": false,
], "files": {
"hash": "sha256-UTjmfOjgGUN4ALk8n2+dD8vr763Jb7xOvAl1yZomHvg="
},
"gradle-semantic-build-versioning-4.0.0.pom": {
"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"
],
"hash": "sha256-TygodBYH7RAtletfGJ1JbHhA7UY6zqifHlGmBWdxTvc="
}
},
"org.eclipse.jgit:org.eclipse.jgit:4.8.0.201706111038-r": {
"org.eclipse.jgit-4.8.0.201706111038-r.jar": {
"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.jar"
],
"hash": "sha256-SdkS6NXM4N0I3KPTkBiduGkqj34zY8274YJYFGIACro="
},
"org.eclipse.jgit-4.8.0.201706111038-r.pom": {
"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"
],
"hash": "sha256-pVap9a38avSbKhLnLcPNfkPbj9whbA81iFlyovWton0="
}
},
"com.jcraft:jsch:0.1.54": {
"jsch-0.1.54.jar": {
"urls": [
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar"
],
"hash": "sha256-kusnOjMWdiR4/dT+A6DOGELFb0lsnBL+EjXbgEUOH9s="
},
"jsch-0.1.54.pom": {
"urls": [
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.pom"
],
"hash": "sha256-q49RIDm+f2riDhjnQ7Sp2KIJWElEMZF9pYrlqu+KNHg="
}
},
"com.googlecode.javaewah:JavaEWAH:1.1.6": {
"JavaEWAH-1.1.6.jar": { "JavaEWAH-1.1.6.jar": {
"urls": [ "urls": [
"https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar" "https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar"
@@ -54,50 +16,34 @@
], ],
"hash": "sha256-f0/5GbHuF783duBYo/IOYXPbI6XkTPLRB+x1cMGGq/A=" "hash": "sha256-f0/5GbHuF783duBYo/IOYXPbI6XkTPLRB+x1cMGGq/A="
} }
}, }
"org.apache.httpcomponents:httpclient:4.3.6": {
"httpclient-4.3.6.jar": {
"urls": [
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar"
],
"hash": "sha256-eYONnq73PU+FLGOkgIMMOi1LWQ8Ks66BWkiUY+RxQAQ="
},
"httpclient-4.3.6.pom": {
"urls": [
"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:4.3.3": { "com.jcraft:jsch": {
"httpcore-4.3.3.jar": { "0.1.54": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"jsch-0.1.54.jar": {
"urls": [ "urls": [
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar" "https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar"
], ],
"hash": "sha256-UoXegK8WUcSJMTuRqfQMZaTNy2s73nFvzAKNFoaaWpM=" "hash": "sha256-kusnOjMWdiR4/dT+A6DOGELFb0lsnBL+EjXbgEUOH9s="
}, },
"httpcore-4.3.3.pom": { "jsch-0.1.54.pom": {
"urls": [ "urls": [
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.pom" "https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.pom"
], ],
"hash": "sha256-tCf3z2fHWk4/niEI01v0UwNXPBRex3j8rc/6zvF6EmQ=" "hash": "sha256-q49RIDm+f2riDhjnQ7Sp2KIJWElEMZF9pYrlqu+KNHg="
}
}
} }
}, },
"commons-logging:commons-logging:1.1.3": { "commons-codec:commons-codec": {
"commons-logging-1.1.3.jar": { "1.6": {
"urls": [ "needsPomRedirect": true,
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar" "needsIvyRedirect": false,
], "files": {
"hash": "sha256-cJA/b8gumQjI2p8gRD9h2Q8IcKMSZCmR/oRioLk5F4Q="
},
"commons-logging-1.1.3.pom": {
"urls": [
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.pom"
],
"hash": "sha256-MlCsOsa9YO0GMfXNAzUDKymT1j5AWmrgVV0np+SGWEk="
}
},
"commons-codec:commons-codec:1.6": {
"commons-codec-1.6.jar": { "commons-codec-1.6.jar": {
"urls": [ "urls": [
"https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar" "https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar"
@@ -110,8 +56,114 @@
], ],
"hash": "sha256-oG410//zprgT2UiU6/PkmPlUDIZMWzmueDkH46bHKIk=" "hash": "sha256-oG410//zprgT2UiU6/PkmPlUDIZMWzmueDkH46bHKIk="
} }
}
}
}, },
"org.slf4j:slf4j-api:1.7.2": { "commons-logging:commons-logging": {
"1.1.3": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"commons-logging-1.1.3.jar": {
"urls": [
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar"
],
"hash": "sha256-cJA/b8gumQjI2p8gRD9h2Q8IcKMSZCmR/oRioLk5F4Q="
},
"commons-logging-1.1.3.pom": {
"urls": [
"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": {
"4.0.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"gradle-semantic-build-versioning-4.0.0.jar": {
"urls": [
"https://plugins.gradle.org/m2/gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0/gradle-semantic-build-versioning-4.0.0.jar"
],
"hash": "sha256-UTjmfOjgGUN4ALk8n2+dD8vr763Jb7xOvAl1yZomHvg="
},
"gradle-semantic-build-versioning-4.0.0.pom": {
"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"
],
"hash": "sha256-TygodBYH7RAtletfGJ1JbHhA7UY6zqifHlGmBWdxTvc="
}
}
}
},
"org.apache.httpcomponents:httpclient": {
"4.3.6": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"httpclient-4.3.6.jar": {
"urls": [
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar"
],
"hash": "sha256-eYONnq73PU+FLGOkgIMMOi1LWQ8Ks66BWkiUY+RxQAQ="
},
"httpclient-4.3.6.pom": {
"urls": [
"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": {
"4.3.3": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"httpcore-4.3.3.jar": {
"urls": [
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar"
],
"hash": "sha256-UoXegK8WUcSJMTuRqfQMZaTNy2s73nFvzAKNFoaaWpM="
},
"httpcore-4.3.3.pom": {
"urls": [
"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": {
"4.8.0.201706111038-r": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"org.eclipse.jgit-4.8.0.201706111038-r.jar": {
"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.jar"
],
"hash": "sha256-SdkS6NXM4N0I3KPTkBiduGkqj34zY8274YJYFGIACro="
},
"org.eclipse.jgit-4.8.0.201706111038-r.pom": {
"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"
],
"hash": "sha256-pVap9a38avSbKhLnLcPNfkPbj9whbA81iFlyovWton0="
}
}
}
},
"org.slf4j:slf4j-api": {
"1.7.2": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"slf4j-api-1.7.2.jar": { "slf4j-api-1.7.2.jar": {
"urls": [ "urls": [
"https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar" "https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar"
@@ -126,3 +178,5 @@
} }
} }
} }
}
}

View File

@@ -1,5 +1,9 @@
{ {
"org.opendof.core-java:dof-cipher-sms4:1.0": { "org.opendof.core-java:dof-cipher-sms4": {
"1.0": {
"needsPomRedirect": false,
"needsIvyRedirect": true,
"files": {
"dof-cipher-sms4-1.0.jar": { "dof-cipher-sms4-1.0.jar": {
"urls": [ "urls": [
"https://asset.opendof.org/artifact/org.opendof.core-java/dof-cipher-sms4/1.0/dof-cipher-sms4-1.0.jar" "https://asset.opendof.org/artifact/org.opendof.core-java/dof-cipher-sms4/1.0/dof-cipher-sms4-1.0.jar"
@@ -12,8 +16,14 @@
], ],
"hash": "sha256-rh+pQpXqPP/cmBD8slvwMrKlWCUb3JNzW3l58hd7oJ8=" "hash": "sha256-rh+pQpXqPP/cmBD8slvwMrKlWCUb3JNzW3l58hd7oJ8="
} }
}
}
}, },
"org.opendof.core-java:dof-oal:7.0.2": { "org.opendof.core-java:dof-oal": {
"7.0.2": {
"needsPomRedirect": false,
"needsIvyRedirect": true,
"files": {
"dof-oal-7.0.2.jar": { "dof-oal-7.0.2.jar": {
"urls": [ "urls": [
"https://asset.opendof.org/artifact/org.opendof.core-java/dof-oal/7.0.2/dof-oal-7.0.2.jar" "https://asset.opendof.org/artifact/org.opendof.core-java/dof-oal/7.0.2/dof-oal-7.0.2.jar"
@@ -28,3 +38,5 @@
} }
} }
} }
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,9 @@
{ {
"org.apache:test:1.0.0": { "org.apache:test": {
"1.0.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"test-1.0.0.jar": { "test-1.0.0.jar": {
"urls": [ "urls": [
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar" "file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar"
@@ -14,3 +18,5 @@
} }
} }
} }
}
}

View File

@@ -1,5 +1,9 @@
{ {
"org.apache:test:1.0.0": { "org.apache:test": {
"1.0.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"test-1.0.0.jar": { "test-1.0.0.jar": {
"urls": [ "urls": [
"file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar" "file:/home/tad/proj/gradle2nix/fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar"
@@ -14,3 +18,5 @@
} }
} }
} }
}
}

View File

@@ -1,89 +1,9 @@
{ {
"junit:junit:4.12": { "com.squareup.moshi:moshi": {
"junit-4.12.jar": { "1.8.0": {
"urls": [ "needsPomRedirect": true,
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar" "needsIvyRedirect": false,
], "files": {
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
},
"junit-4.12.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
],
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
}
},
"org.hamcrest:hamcrest-core:1.3": {
"hamcrest-core-1.3.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
],
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
},
"hamcrest-core-1.3.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom"
],
"hash": "sha256-/eOGp5BRc6GxA95quCBydYS1DQ4yKC4nl3h8IKZP+pM="
}
},
"com.squareup.okio:okio:2.2.2": {
"okio-2.2.2.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
],
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"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:1.2.60": {
"kotlin-stdlib-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
],
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
},
"kotlin-stdlib-1.2.60.pom": {
"urls": [
"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:1.2.60": {
"kotlin-stdlib-common-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
],
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
},
"kotlin-stdlib-common-1.2.60.pom": {
"urls": [
"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:13.0": {
"annotations-13.0.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
],
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
},
"annotations-13.0.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
],
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
}
},
"com.squareup.moshi:moshi:1.8.0": {
"moshi-1.8.0.jar": { "moshi-1.8.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar" "https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
@@ -96,8 +16,32 @@
], ],
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8=" "hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
} }
}
}
}, },
"com.squareup.okio:okio:1.16.0": { "com.squareup.okio:okio": {
"2.2.2": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"okio-2.2.2.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
],
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
],
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
}
}
},
"1.16.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"okio-1.16.0.jar": { "okio-1.16.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar" "https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar"
@@ -112,3 +56,105 @@
} }
} }
} }
},
"junit:junit": {
"4.12": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"junit-4.12.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar"
],
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
},
"junit-4.12.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
],
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
}
}
}
},
"org.hamcrest:hamcrest-core": {
"1.3": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"hamcrest-core-1.3.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
],
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
},
"hamcrest-core-1.3.pom": {
"urls": [
"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": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
],
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
},
"kotlin-stdlib-1.2.60.pom": {
"urls": [
"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": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-common-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
],
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
},
"kotlin-stdlib-common-1.2.60.pom": {
"urls": [
"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": {
"13.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"annotations-13.0.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
],
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
},
"annotations-13.0.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
],
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
}
}
}
}
}

View File

@@ -1,89 +1,9 @@
{ {
"junit:junit:4.12": { "com.squareup.moshi:moshi": {
"junit-4.12.jar": { "1.8.0": {
"urls": [ "needsPomRedirect": true,
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar" "needsIvyRedirect": false,
], "files": {
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
},
"junit-4.12.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
],
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
}
},
"org.hamcrest:hamcrest-core:1.3": {
"hamcrest-core-1.3.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
],
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
},
"hamcrest-core-1.3.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom"
],
"hash": "sha256-/eOGp5BRc6GxA95quCBydYS1DQ4yKC4nl3h8IKZP+pM="
}
},
"com.squareup.okio:okio:2.2.2": {
"okio-2.2.2.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
],
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"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:1.2.60": {
"kotlin-stdlib-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
],
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
},
"kotlin-stdlib-1.2.60.pom": {
"urls": [
"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:1.2.60": {
"kotlin-stdlib-common-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
],
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
},
"kotlin-stdlib-common-1.2.60.pom": {
"urls": [
"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:13.0": {
"annotations-13.0.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
],
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
},
"annotations-13.0.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
],
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
}
},
"com.squareup.moshi:moshi:1.8.0": {
"moshi-1.8.0.jar": { "moshi-1.8.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar" "https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi/1.8.0/moshi-1.8.0.jar"
@@ -96,8 +16,32 @@
], ],
"hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8=" "hash": "sha256-FLuAWbnddiACWSkN+IfjfmaaB0qsnImUAePIEC/lII8="
} }
}
}
}, },
"com.squareup.okio:okio:1.16.0": { "com.squareup.okio:okio": {
"2.2.2": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"okio-2.2.2.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar"
],
"hash": "sha256-5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs="
},
"okio-2.2.2.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom"
],
"hash": "sha256-/WIZiPf2lXAlc13G3QkLAKIPOju413ynkDYHf2KbFAs="
}
}
},
"1.16.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"okio-1.16.0.jar": { "okio-1.16.0.jar": {
"urls": [ "urls": [
"https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar" "https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.16.0/okio-1.16.0.jar"
@@ -112,3 +56,105 @@
} }
} }
} }
},
"junit:junit": {
"4.12": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"junit-4.12.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.jar"
],
"hash": "sha256-WXIfCAXiI9hLkGd4h9n/Vn3FNNfFAsqQPAwrF/BcEWo="
},
"junit-4.12.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom"
],
"hash": "sha256-kPFj944/+28cetl96efrpO6iWAcUG4XW0SvmfKJUScQ="
}
}
}
},
"org.hamcrest:hamcrest-core": {
"1.3": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"hamcrest-core-1.3.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
],
"hash": "sha256-Zv3vkelzk0jfeglqo4SlaF9Oh1WEzOiThqekclHE2Ok="
},
"hamcrest-core-1.3.pom": {
"urls": [
"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": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.60/kotlin-stdlib-1.2.60.jar"
],
"hash": "sha256-ahMCmPUXGsUqHiSW9+rnhbb1ZBbqPMuZ5DRNBNg/8HE="
},
"kotlin-stdlib-1.2.60.pom": {
"urls": [
"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": {
"1.2.60": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"kotlin-stdlib-common-1.2.60.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.60/kotlin-stdlib-common-1.2.60.jar"
],
"hash": "sha256-CbQ3WgZc8SeryZjF3PIrFmTEWvQrSJSZ16j0+Kt5P7E="
},
"kotlin-stdlib-common-1.2.60.pom": {
"urls": [
"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": {
"13.0": {
"needsPomRedirect": true,
"needsIvyRedirect": false,
"files": {
"annotations-13.0.jar": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar"
],
"hash": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg="
},
"annotations-13.0.pom": {
"urls": [
"https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom"
],
"hash": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
package org.nixos.gradle2nix.dependencygraph.model package org.nixos.gradle2nix
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable

View File

@@ -1,8 +1,7 @@
package org.nixos.gradle2nix.dependencygraph.model package org.nixos.gradle2nix.dependencygraph.model
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import org.nixos.gradle2nix.DependencyCoordinates
// private const val DEFAULT_MAVEN_REPOSITORY_URL = "https://repo.maven.apache.org/maven2"
@Serializable @Serializable
data class ResolvedDependency( data class ResolvedDependency(
@@ -13,20 +12,3 @@ data class ResolvedDependency(
val repository: String?, val repository: String?,
val dependencies: List<String> val dependencies: List<String>
) )
//{
// fun packageUrl() =
// PackageURLBuilder
// .aPackageURL()
// .withType("maven")
// .withNamespace(coordinates.group.ifEmpty { coordinates.module }) // TODO: This is a sign of broken mapping from component -> PURL
// .withName(coordinates.module)
// .withVersion(coordinates.version)
// .also {
// if (repositoryUrl != null && repositoryUrl != DEFAULT_MAVEN_REPOSITORY_URL) {
// it.withQualifier("repository_url", repositoryUrl)
// }
// }
// .build()
// .toString()
//
//}

View File

@@ -20,7 +20,7 @@ import org.nixos.gradle2nix.PARAM_INCLUDE_CONFIGURATIONS
import org.nixos.gradle2nix.PARAM_INCLUDE_PROJECTS import org.nixos.gradle2nix.PARAM_INCLUDE_PROJECTS
import org.nixos.gradle2nix.PARAM_REPORT_DIR import org.nixos.gradle2nix.PARAM_REPORT_DIR
import org.nixos.gradle2nix.dependencygraph.DependencyGraphRenderer import org.nixos.gradle2nix.dependencygraph.DependencyGraphRenderer
import org.nixos.gradle2nix.dependencygraph.model.DependencyCoordinates import org.nixos.gradle2nix.DependencyCoordinates
import org.nixos.gradle2nix.dependencygraph.model.DependencySource import org.nixos.gradle2nix.dependencygraph.model.DependencySource
import org.nixos.gradle2nix.dependencygraph.model.Repository import org.nixos.gradle2nix.dependencygraph.model.Repository
import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration import org.nixos.gradle2nix.dependencygraph.model.ResolvedConfiguration