mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-12 07:50:53 -05:00
Compare commits
27 Commits
v1.0.0-rc1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68327d0c5d | ||
|
|
acd8fb9328 | ||
|
|
d3c140dea6 | ||
|
|
6b20125670 | ||
|
|
fafe5b7e0b | ||
|
|
7f7d6a888b | ||
|
|
56c4bb435d | ||
|
|
9c705b5f1b | ||
|
|
80b8a7d52e | ||
|
|
55b3b60535 | ||
|
|
13958d35bf | ||
|
|
716f137343 | ||
|
|
f047221f5f | ||
|
|
6faed26b31 | ||
|
|
7c02e63afa | ||
|
|
fd6a6f4693 | ||
|
|
a99b5f40e3 | ||
|
|
beb157cf18 | ||
|
|
2ad217b878 | ||
|
|
e05b6382ca | ||
|
|
b88ee98da2 | ||
|
|
59e8130e64 | ||
|
|
dd5d60e835 | ||
|
|
23cb225ccf | ||
|
|
c949f19891 | ||
|
|
c3c4079566 | ||
|
|
baa58da5a1 |
10
README.org
10
README.org
@@ -80,6 +80,16 @@ nix-env -if "https://github.com/tadfisher/gradle2nix/archive/master.tar.gz"
|
|||||||
=gradle2nix= is not yet packaged in =nixpkgs= itself, but work is
|
=gradle2nix= is not yet packaged in =nixpkgs= itself, but work is
|
||||||
[[https://github.com/NixOS/nixpkgs/pull/77422][in progress]].
|
[[https://github.com/NixOS/nixpkgs/pull/77422][in progress]].
|
||||||
|
|
||||||
|
*** Flake (experimental)
|
||||||
|
|
||||||
|
A [[./flake.nix][flake.nix]] is provided for those using [[https://nixos.wiki/wiki/Flakes][Nix flakes]]. For example, the
|
||||||
|
following will build and run =gradle2nix= with the arguments provided
|
||||||
|
after =--=:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
nix run github:tadfisher/gradle2nix -- --help
|
||||||
|
#+end_example
|
||||||
|
|
||||||
** Usage
|
** Usage
|
||||||
|
|
||||||
#+begin_example
|
#+begin_example
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":model"))
|
implementation(project(":model"))
|
||||||
implementation(kotlin("stdlib-jdk8"))
|
|
||||||
implementation(kotlin("reflect"))
|
implementation(kotlin("reflect"))
|
||||||
implementation("org.gradle:gradle-tooling-api:${gradle.gradleVersion}")
|
implementation("org.gradle:gradle-tooling-api:${gradle.gradleVersion}")
|
||||||
implementation("com.github.ajalt:clikt:latest.release")
|
implementation("com.github.ajalt:clikt:latest.release")
|
||||||
@@ -18,23 +17,36 @@ dependencies {
|
|||||||
implementation("com.squareup.moshi:moshi-kotlin:latest.release")
|
implementation("com.squareup.moshi:moshi-kotlin:latest.release")
|
||||||
kapt("com.squareup.moshi:moshi-kotlin-codegen:latest.release")
|
kapt("com.squareup.moshi:moshi-kotlin-codegen:latest.release")
|
||||||
implementation("com.squareup.okio:okio:latest.release")
|
implementation("com.squareup.okio:okio:latest.release")
|
||||||
|
|
||||||
|
testRuntimeOnly(kotlin("reflect"))
|
||||||
|
testImplementation("org.spekframework.spek2:spek-dsl-jvm:latest.release")
|
||||||
|
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:latest.release")
|
||||||
|
testImplementation("io.strikt:strikt-core:latest.release")
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
mainClassName = "org.nixos.gradle2nix.MainKt"
|
mainClass.set("org.nixos.gradle2nix.MainKt")
|
||||||
applicationName = "gradle2nix"
|
applicationName = "gradle2nix"
|
||||||
applicationDefaultJvmArgs += "-Dorg.nixos.gradle2nix.share=@APP_HOME@/share"
|
applicationDefaultJvmArgs += "-Dorg.nixos.gradle2nix.share=@APP_HOME@/share"
|
||||||
applicationDistribution
|
applicationDistribution
|
||||||
.from(tasks.getByPath(":plugin:shadowJar"))
|
.from(tasks.getByPath(":plugin:shadowJar"), "$rootDir/gradle-env.nix")
|
||||||
.into("share")
|
.into("share")
|
||||||
.rename("plugin.*\\.jar", "plugin.jar")
|
.rename("plugin.*\\.jar", "plugin.jar")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
test {
|
||||||
|
resources {
|
||||||
|
srcDir("$rootDir/fixtures")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
(run) {
|
(run) {
|
||||||
dependsOn(installDist)
|
dependsOn(installDist)
|
||||||
doFirst {
|
doFirst {
|
||||||
jvmArgs = listOf("-Dorg.nixos.gradle2nix.share=${installDist.get().destinationDir.resolve("share")}")
|
systemProperties("org.nixos.gradle2nix.share" to installDist.get().destinationDir.resolve("share"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,9 +57,23 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
dependsOn(installDist)
|
||||||
|
doFirst {
|
||||||
|
systemProperties("org.nixos.gradle2nix.share" to installDist.get().destinationDir.resolve("share"))
|
||||||
|
}
|
||||||
|
useJUnitPlatform {
|
||||||
|
includeEngines("spek2")
|
||||||
|
}
|
||||||
|
testLogging {
|
||||||
|
events("passed", "skipped", "failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
withType<KotlinCompile> {
|
withType<KotlinCompile> {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "1.8"
|
jvmTarget = "1.8"
|
||||||
|
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
38
app/gradle.lockfile
Normal file
38
app/gradle.lockfile
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# This is a Gradle generated file for dependency locking.
|
||||||
|
# Manual edits can break the build and are not advised.
|
||||||
|
# This file is expected to be part of source control.
|
||||||
|
com.christophsturm:filepeek:0.1.2=testRuntimeClasspath
|
||||||
|
com.github.ajalt:clikt:2.8.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.squareup.moshi:moshi-adapters:1.11.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.squareup.moshi:moshi-kotlin:1.11.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.squareup.moshi:moshi:1.11.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.squareup.okio:okio:3.0.0-alpha.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
io.github.classgraph:classgraph:4.8.37=testRuntimeClasspath
|
||||||
|
io.strikt:strikt-core:0.28.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
net.swiftzer.semver:semver:1.1.1=runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.0=testRuntimeClasspath
|
||||||
|
org.gradle:gradle-tooling-api:6.8.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-reflect:1.4.20=compileClasspath,runtimeClasspath,testCompileClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-reflect:1.4.21-2=testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3=testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.2=testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2=testRuntimeClasspath
|
||||||
|
org.jetbrains:annotations:13.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-commons:1.6.0=testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-engine:1.6.0=testRuntimeClasspath
|
||||||
|
org.junit:junit-bom:5.6.0=testRuntimeClasspath
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.slf4j:slf4j-api:2.0.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.slf4j:slf4j-simple:2.0.0-alpha1=runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.spekframework.spek2:spek-dsl-jvm:2.0.15=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.spekframework.spek2:spek-runner-junit5:2.0.15=testRuntimeClasspath
|
||||||
|
org.spekframework.spek2:spek-runtime-jvm:2.0.15=testRuntimeClasspath
|
||||||
|
empty=
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.github.ajalt:clikt:2.3.0
|
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:2.4.3
|
|
||||||
org.gradle:gradle-tooling-api:6.1
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
|
||||||
org.jetbrains:annotations:13.0
|
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.github.ajalt:clikt:2.3.0
|
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:2.4.3
|
|
||||||
net.swiftzer.semver:semver:1.1.1
|
|
||||||
org.gradle:gradle-tooling-api:6.1
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
|
||||||
org.jetbrains:annotations:13.0
|
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
|
||||||
org.slf4j:slf4j-simple:2.0.0-alpha1
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.github.ajalt:clikt:2.3.0
|
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:2.4.3
|
|
||||||
org.gradle:gradle-tooling-api:6.1
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
|
||||||
org.jetbrains:annotations:13.0
|
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.github.ajalt:clikt:2.3.0
|
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:2.4.3
|
|
||||||
net.swiftzer.semver:semver:1.1.1
|
|
||||||
org.gradle:gradle-tooling-api:6.1
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
|
||||||
org.jetbrains:annotations:13.0
|
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
|
||||||
org.slf4j:slf4j-simple:2.0.0-alpha1
|
|
||||||
@@ -19,6 +19,7 @@ fun buildEnv(builds: Map<String, DefaultBuild>): Map<String, NixGradleEnv> =
|
|||||||
path = path,
|
path = path,
|
||||||
gradle = build.gradle,
|
gradle = build.gradle,
|
||||||
dependencies = mapOf(
|
dependencies = mapOf(
|
||||||
|
"settings" to build.settingsDependencies,
|
||||||
"plugin" to build.pluginDependencies,
|
"plugin" to build.pluginDependencies,
|
||||||
"buildscript" to build.rootProject.collectDependencies(DefaultProject::buildscriptDependencies),
|
"buildscript" to build.rootProject.collectDependencies(DefaultProject::buildscriptDependencies),
|
||||||
"project" to build.rootProject.collectDependencies(DefaultProject::projectDependencies)
|
"project" to build.rootProject.collectDependencies(DefaultProject::projectDependencies)
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ fun ProjectConnection.getBuildModel(config: Config, path: String): DefaultBuild
|
|||||||
if (config.gradleArgs != null) addArguments(config.gradleArgs)
|
if (config.gradleArgs != null) addArguments(config.gradleArgs)
|
||||||
if (path.isNotEmpty()) addArguments("--project-dir=$path")
|
if (path.isNotEmpty()) addArguments("--project-dir=$path")
|
||||||
if (!config.quiet) {
|
if (!config.quiet) {
|
||||||
setColorOutput(true)
|
|
||||||
setStandardOutput(System.err)
|
setStandardOutput(System.err)
|
||||||
setStandardError(System.err)
|
setStandardError(System.err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import com.github.ajalt.clikt.parameters.options.default
|
|||||||
import com.github.ajalt.clikt.parameters.options.flag
|
import com.github.ajalt.clikt.parameters.options.flag
|
||||||
import com.github.ajalt.clikt.parameters.options.multiple
|
import com.github.ajalt.clikt.parameters.options.multiple
|
||||||
import com.github.ajalt.clikt.parameters.options.option
|
import com.github.ajalt.clikt.parameters.options.option
|
||||||
import com.github.ajalt.clikt.parameters.options.split
|
|
||||||
import com.github.ajalt.clikt.parameters.options.validate
|
import com.github.ajalt.clikt.parameters.options.validate
|
||||||
import com.github.ajalt.clikt.parameters.types.file
|
import com.github.ajalt.clikt.parameters.types.file
|
||||||
import com.squareup.moshi.Moshi
|
import com.squareup.moshi.Moshi
|
||||||
@@ -55,7 +54,7 @@ class Main : CliktCommand(
|
|||||||
private val includes: List<File> by option("--include", "-i",
|
private val includes: List<File> by option("--include", "-i",
|
||||||
metavar = "DIR",
|
metavar = "DIR",
|
||||||
help = "Add an additional project to include")
|
help = "Add an additional project to include")
|
||||||
.file(exists = true, fileOkay = false, folderOkay = true, readable = true)
|
.file(mustExist = true, canBeFile = false, canBeDir = true, mustBeReadable = true)
|
||||||
.multiple()
|
.multiple()
|
||||||
.validate { files ->
|
.validate { files ->
|
||||||
val failures = files.filterNot { it.isProjectRoot() }
|
val failures = files.filterNot { it.isProjectRoot() }
|
||||||
@@ -79,12 +78,12 @@ class Main : CliktCommand(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val outDir: File? by option("--out-dir", "-o",
|
val outDir: File? by option("--out-dir", "-o",
|
||||||
metavar = "DIR",
|
metavar = "DIR",
|
||||||
help = "Path to write generated files (default: PROJECT-DIR)")
|
help = "Path to write generated files (default: PROJECT-DIR)")
|
||||||
.file(fileOkay = false, folderOkay = true)
|
.file(canBeFile = false, canBeDir = true)
|
||||||
|
|
||||||
private val envFile: String by option("--env", "-e",
|
val envFile: String by option("--env", "-e",
|
||||||
metavar = "FILENAME",
|
metavar = "FILENAME",
|
||||||
help = "Prefix for environment files (.json and .nix)")
|
help = "Prefix for environment files (.json and .nix)")
|
||||||
.default("gradle-env")
|
.default("gradle-env")
|
||||||
@@ -105,8 +104,11 @@ class Main : CliktCommand(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Visible for testing
|
||||||
|
lateinit var config: Config
|
||||||
|
|
||||||
override fun run() {
|
override fun run() {
|
||||||
val config = Config(
|
config = Config(
|
||||||
gradleVersion,
|
gradleVersion,
|
||||||
gradleArgs,
|
gradleArgs,
|
||||||
configurations,
|
configurations,
|
||||||
|
|||||||
19
app/src/test/kotlin/org/nixos/gradle2nix/BuildSrcTest.kt
Normal file
19
app/src/test/kotlin/org/nixos/gradle2nix/BuildSrcTest.kt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import org.spekframework.spek2.Spek
|
||||||
|
import org.spekframework.spek2.style.specification.describe
|
||||||
|
import strikt.api.expectThat
|
||||||
|
import strikt.assertions.containsKey
|
||||||
|
|
||||||
|
object BuildSrcTest : Spek({
|
||||||
|
fixture("buildsrc/plugin-in-buildsrc/kotlin")
|
||||||
|
val fixture: Fixture by memoized()
|
||||||
|
|
||||||
|
describe("project with plugin in buildSrc") {
|
||||||
|
fixture.run()
|
||||||
|
|
||||||
|
it("should include buildSrc in gradle env", timeout = 0) {
|
||||||
|
expectThat(fixture.env()).containsKey("buildSrc")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
60
app/src/test/kotlin/org/nixos/gradle2nix/TestUtil.kt
Normal file
60
app/src/test/kotlin/org/nixos/gradle2nix/TestUtil.kt
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import com.squareup.moshi.Moshi
|
||||||
|
import com.squareup.moshi.Types
|
||||||
|
import okio.buffer
|
||||||
|
import okio.source
|
||||||
|
import org.spekframework.spek2.dsl.Root
|
||||||
|
import strikt.api.expectThat
|
||||||
|
import strikt.assertions.exists
|
||||||
|
import strikt.assertions.isNotNull
|
||||||
|
import strikt.assertions.toPath
|
||||||
|
import java.nio.file.Files
|
||||||
|
import java.nio.file.Path
|
||||||
|
import java.nio.file.Paths
|
||||||
|
import kotlin.io.path.ExperimentalPathApi
|
||||||
|
import kotlin.io.path.createTempDirectory
|
||||||
|
|
||||||
|
private val moshi = Moshi.Builder().build()
|
||||||
|
|
||||||
|
class Fixture(val project: Path) {
|
||||||
|
private val app = Main()
|
||||||
|
|
||||||
|
fun run(vararg args: String) {
|
||||||
|
app.main(args.toList() + project.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
fun env(): Map<String, NixGradleEnv> {
|
||||||
|
val file = (app.outDir ?: project.toFile()).resolve("${app.envFile}.json")
|
||||||
|
expectThat(file).toPath().exists()
|
||||||
|
val env = file.source().buffer().use { source ->
|
||||||
|
moshi
|
||||||
|
.adapter<Map<String, NixGradleEnv>>(
|
||||||
|
Types.newParameterizedType(Map::class.java, String::class.java, NixGradleEnv::class.java)
|
||||||
|
).fromJson(source)
|
||||||
|
}
|
||||||
|
expectThat(env).isNotNull()
|
||||||
|
return env!!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalPathApi::class)
|
||||||
|
fun Root.fixture(name: String) {
|
||||||
|
val fixture by memoized(
|
||||||
|
factory = {
|
||||||
|
val url = checkNotNull(Thread.currentThread().contextClassLoader.getResource(name)?.toURI()) {
|
||||||
|
"$name: No test fixture found"
|
||||||
|
}
|
||||||
|
val fixtureRoot = Paths.get(url)
|
||||||
|
val dest = createTempDirectory("gradle2nix")
|
||||||
|
val src = checkNotNull(fixtureRoot.takeIf { Files.exists(it) }) {
|
||||||
|
"$name: Test fixture not found: $fixtureRoot"
|
||||||
|
}
|
||||||
|
src.toFile().copyRecursively(dest.toFile())
|
||||||
|
Fixture(dest)
|
||||||
|
},
|
||||||
|
destructor = {
|
||||||
|
it.project.toFile().deleteRecursively()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,20 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
base
|
base
|
||||||
idea
|
|
||||||
kotlin("jvm") version embeddedKotlinVersion apply false
|
|
||||||
kotlin("kapt") version embeddedKotlinVersion apply false
|
|
||||||
id("com.github.johnrengelman.shadow") version "5.2.0" apply false
|
|
||||||
id("org.ajoberstar.stutter") version "0.5.1" apply false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "org.nixos.gradle2nix"
|
group = "org.nixos.gradle2nix"
|
||||||
version = property("VERSION") ?: "unspecified"
|
version = property("VERSION") ?: "unspecified"
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
maven { url = uri("https://repo.gradle.org/gradle/libs-releases") }
|
|
||||||
}
|
|
||||||
group = rootProject.group
|
group = rootProject.group
|
||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
}
|
}
|
||||||
@@ -36,12 +27,11 @@ allprojects {
|
|||||||
tasks.register("lock") {
|
tasks.register("lock") {
|
||||||
doFirst {
|
doFirst {
|
||||||
assert(gradle.startParameter.isWriteDependencyLocks)
|
assert(gradle.startParameter.isWriteDependencyLocks)
|
||||||
|
file("buildscript-gradle.lockfile").delete()
|
||||||
|
file("gradle.lockfile").delete()
|
||||||
}
|
}
|
||||||
doLast {
|
doLast {
|
||||||
sourceSets.all {
|
configurations.matching { it.isCanBeResolved }.all { resolve() }
|
||||||
configurations[compileClasspathConfigurationName].resolve()
|
|
||||||
configurations[runtimeClasspathConfigurationName].resolve()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,7 +40,7 @@ allprojects {
|
|||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
wrapper {
|
wrapper {
|
||||||
gradleVersion = "6.1"
|
gradleVersion = "6.8.1"
|
||||||
distributionType = Wrapper.DistributionType.ALL
|
distributionType = Wrapper.DistributionType.ALL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
default.nix
25
default.nix
@@ -3,12 +3,25 @@
|
|||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let
|
let
|
||||||
buildGradle = pkgs.callPackage ./gradle-env.nix {};
|
buildGradle = callPackage ./gradle-env.nix {};
|
||||||
|
|
||||||
in buildGradle {
|
gradle2nix = buildGradle {
|
||||||
envSpec = ./gradle-env.json;
|
envSpec = ./gradle-env.json;
|
||||||
|
|
||||||
|
src = lib.cleanSourceWith {
|
||||||
|
filter = lib.cleanSourceFilter;
|
||||||
|
src = lib.cleanSourceWith {
|
||||||
|
filter = path: type: let baseName = baseNameOf path; in !(
|
||||||
|
(type == "directory" && (
|
||||||
|
baseName == "build" ||
|
||||||
|
baseName == ".idea" ||
|
||||||
|
baseName == ".gradle"
|
||||||
|
)) ||
|
||||||
|
(lib.hasSuffix ".iml" baseName)
|
||||||
|
);
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
gradleFlags = [ "installDist" ];
|
gradleFlags = [ "installDist" ];
|
||||||
|
|
||||||
@@ -16,4 +29,10 @@ in buildGradle {
|
|||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r app/build/install/gradle2nix/* $out/
|
cp -r app/build/install/gradle2nix/* $out/
|
||||||
'';
|
'';
|
||||||
}
|
|
||||||
|
passthru = {
|
||||||
|
plugin = "${gradle2nix}/share/plugin.jar";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in gradle2nix
|
||||||
|
|||||||
30
fixtures/basic/basic-kotlin-project/kotlin/build.gradle.kts
Normal file
30
fixtures/basic/basic-kotlin-project/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
val kotlinVersion = "1.3.61"
|
||||||
|
val spekVersion = "2.0.9"
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
application
|
||||||
|
kotlin("jvm") version "1.3.61"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile(kotlin("stdlib"))
|
||||||
|
implementation("com.natpryce:konfig:1.6.10.0")
|
||||||
|
implementation("com.github.pengrad:java-telegram-bot-api:4.6.0")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3")
|
||||||
|
implementation("org.jetbrains.exposed:exposed-core:0.21.1")
|
||||||
|
implementation("org.jetbrains.exposed", "exposed-dao", "0.21.1")
|
||||||
|
implementation("org.jetbrains.exposed", "exposed-jdbc", "0.21.1")
|
||||||
|
implementation("org.jetbrains.exposed", "exposed-jodatime", "0.21.1")
|
||||||
|
implementation("io.javalin:javalin:3.7.0")
|
||||||
|
implementation("org.slf4j:slf4j-simple:1.8.0-beta4")
|
||||||
|
implementation(group = "org.xerial", name = "sqlite-jdbc", version = "3.30.1")
|
||||||
|
implementation("org.postgresql:postgresql:42.2.2")
|
||||||
|
implementation("com.fasterxml.jackson.core:jackson-databind:2.10.1")
|
||||||
|
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion")
|
||||||
|
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion")
|
||||||
|
testCompile("com.winterbe:expekt:0.5.0")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
plugins {
|
||||||
|
`java-library`
|
||||||
|
id("com.example.custom-spotless")
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("com.diffplug.spotless:spotless-plugin-gradle:3.28.1")
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.example
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
com.diffplug.gradle.spotless
|
||||||
|
}
|
||||||
|
|
||||||
|
spotless {
|
||||||
|
kotlin {
|
||||||
|
ktlint()
|
||||||
|
}
|
||||||
|
}
|
||||||
12
fixtures/dependency/maven-bom/kotlin/build.gradle.kts
Normal file
12
fixtures/dependency/maven-bom/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url = uri("http://localhost:9999") }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(platform("io.micrometer:micrometer-bom:1.5.1"))
|
||||||
|
implementation("io.micrometer:micrometer-core")
|
||||||
|
}
|
||||||
11
fixtures/dependency/snapshot-dynamic/groovy/build.gradle
Normal file
11
fixtures/dependency/snapshot-dynamic/groovy/build.gradle
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
plugins {
|
||||||
|
id "java"
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url = uri("http://localhost:9999") }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation "org.apache:test-SNAPSHOT1:2.0.2-SNAPSHOT"
|
||||||
|
}
|
||||||
11
fixtures/dependency/snapshot-dynamic/kotlin/build.gradle.kts
Normal file
11
fixtures/dependency/snapshot-dynamic/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url = uri("http://localhost:9999") }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
"implementation"("org.apache:test-SNAPSHOT1:2.0.2-SNAPSHOT")
|
||||||
|
}
|
||||||
@@ -3,10 +3,9 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
maven { url = uri("http://localhost:9999") }
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "com.squareup.okio:okio:2.5.0-SNAPSHOT"
|
implementation "org.apache:test-SNAPSHOT2:2.0.2-SNAPSHOT"
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,9 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
maven { url = uri("http://localhost:9999") }
|
||||||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"implementation"("com.squareup.okio:okio:2.5.0-SNAPSHOT")
|
"implementation"("org.apache:test-SNAPSHOT2:2.0.2-SNAPSHOT")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
version = '1.1.0'
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
with (import <nixpkgs> {});
|
||||||
|
let
|
||||||
|
buildGradle = callPackage ./gradle-env.nix {};
|
||||||
|
in
|
||||||
|
buildGradle {
|
||||||
|
envSpec = ./gradle-env.json;
|
||||||
|
src = ./.;
|
||||||
|
gradleFlags = [ "tasks" ];
|
||||||
|
}
|
||||||
456
fixtures/integration/settings-buildscript/groovy/gradle-env.json
Normal file
456
fixtures/integration/settings-buildscript/groovy/gradle-env.json
Normal file
@@ -0,0 +1,456 @@
|
|||||||
|
{
|
||||||
|
"": {
|
||||||
|
"name": "settings-buildscript",
|
||||||
|
"version": "1.1.0",
|
||||||
|
"path": "",
|
||||||
|
"gradle": {
|
||||||
|
"version": "5.0",
|
||||||
|
"type": "bin",
|
||||||
|
"url": "https://services.gradle.org/distributions/gradle-5.0-bin.zip",
|
||||||
|
"sha256": "6157ac9f3410bc63644625b3b3e9e96c963afd7910ae0697792db57813ee79a6",
|
||||||
|
"nativeVersion": "0.14"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "com.googlecode.javaewah",
|
||||||
|
"name": "JavaEWAH",
|
||||||
|
"version": "1.1.6",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "JavaEWAH-1.1.6.jar",
|
||||||
|
"path": "com/googlecode/javaewah/JavaEWAH/1.1.6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar"
|
||||||
|
],
|
||||||
|
"sha256": "f78d44a1e3877f1ce748b4a85df5171e5e8e9a5c3c6f63bb9003db6f84cce952"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "com.googlecode.javaewah",
|
||||||
|
"name": "JavaEWAH",
|
||||||
|
"version": "1.1.6",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "JavaEWAH-1.1.6.pom",
|
||||||
|
"path": "com/googlecode/javaewah/JavaEWAH/1.1.6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.pom"
|
||||||
|
],
|
||||||
|
"sha256": "7f4ff919b1ee17bf3776e058a3f20e6173db23a5e44cf2d107ec7570c186abf0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "com.jcraft",
|
||||||
|
"name": "jsch",
|
||||||
|
"version": "0.1.54",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "jsch-0.1.54.jar",
|
||||||
|
"path": "com/jcraft/jsch/0.1.54",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar"
|
||||||
|
],
|
||||||
|
"sha256": "92eb273a3316762478fdd4fe03a0ce1842c56f496c9c12fe1235db80450e1fdb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "com.jcraft",
|
||||||
|
"name": "jsch",
|
||||||
|
"version": "0.1.54",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "jsch-0.1.54.pom",
|
||||||
|
"path": "com/jcraft/jsch/0.1.54",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/com/jcraft/jsch/0.1.54/jsch-0.1.54.pom"
|
||||||
|
],
|
||||||
|
"sha256": "ab8f512039be7f6ae20e18e743b4a9d8a20958494431917da58ae5aaef8a3478"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "commons-codec",
|
||||||
|
"name": "commons-codec",
|
||||||
|
"version": "1.6",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "commons-codec-1.6.jar",
|
||||||
|
"path": "commons-codec/commons-codec/1.6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar"
|
||||||
|
],
|
||||||
|
"sha256": "54b34e941b8e1414bd3e40d736efd3481772dc26db3296f6aa45cec9f6203d86"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "commons-codec",
|
||||||
|
"name": "commons-codec",
|
||||||
|
"version": "1.6",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "commons-codec-1.6.pom",
|
||||||
|
"path": "commons-codec/commons-codec/1.6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/commons-codec/commons-codec/1.6/commons-codec-1.6.pom"
|
||||||
|
],
|
||||||
|
"sha256": "a06e35d3fff3a6b813d94894ebf3e498f9540c864c5b39ae783907e3a6c72889"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "commons-logging",
|
||||||
|
"name": "commons-logging",
|
||||||
|
"version": "1.1.3",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "commons-logging-1.1.3.jar",
|
||||||
|
"path": "commons-logging/commons-logging/1.1.3",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar"
|
||||||
|
],
|
||||||
|
"sha256": "70903f6fc82e9908c8da9f20443f61d90f0870a312642991fe8462a0b9391784"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "commons-logging",
|
||||||
|
"name": "commons-logging",
|
||||||
|
"version": "1.1.3",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "commons-logging-1.1.3.pom",
|
||||||
|
"path": "commons-logging/commons-logging/1.1.3",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.pom"
|
||||||
|
],
|
||||||
|
"sha256": "3250ac3ac6bd60ed0631f5cd0335032b2993d63e405a6ae0555d27a7e4865849"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "gradle.plugin.net.vivin",
|
||||||
|
"name": "gradle-semantic-build-versioning",
|
||||||
|
"version": "4.0.0",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "gradle-semantic-build-versioning-4.0.0.jar",
|
||||||
|
"path": "gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0",
|
||||||
|
"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"
|
||||||
|
],
|
||||||
|
"sha256": "5138e67ce8e019437800b93c9f6f9d0fcbebefadc96fbc4ebc0975c99a261ef8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "gradle.plugin.net.vivin",
|
||||||
|
"name": "gradle-semantic-build-versioning",
|
||||||
|
"version": "4.0.0",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "gradle-semantic-build-versioning-4.0.0.pom",
|
||||||
|
"path": "gradle/plugin/net/vivin/gradle-semantic-build-versioning/4.0.0",
|
||||||
|
"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"
|
||||||
|
],
|
||||||
|
"sha256": "4f2828741607ed102d95eb5f189d496c7840ed463acea89f1e51a60567714ef7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache",
|
||||||
|
"name": "apache",
|
||||||
|
"version": "9",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "apache-9.pom",
|
||||||
|
"path": "org/apache/apache/9",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/apache/9/apache-9.pom"
|
||||||
|
],
|
||||||
|
"sha256": "4946e60a547c8eda69f3bc23c5b6f0dadcf8469ea49b1d1da7de34aecfcf18dd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache",
|
||||||
|
"name": "apache",
|
||||||
|
"version": "13",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "apache-13.pom",
|
||||||
|
"path": "org/apache/apache/13",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/apache/13/apache-13.pom"
|
||||||
|
],
|
||||||
|
"sha256": "ff513db0361fd41237bef4784968bc15aae478d4ec0a9496f811072ccaf3841d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.commons",
|
||||||
|
"name": "commons-parent",
|
||||||
|
"version": "22",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "commons-parent-22.pom",
|
||||||
|
"path": "org/apache/commons/commons-parent/22",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/commons/commons-parent/22/commons-parent-22.pom"
|
||||||
|
],
|
||||||
|
"sha256": "fb8c5e55e30a7addb4ff210858a0e8d2494ed6757bbe19012da99d51586c3cbb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.commons",
|
||||||
|
"name": "commons-parent",
|
||||||
|
"version": "28",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "commons-parent-28.pom",
|
||||||
|
"path": "org/apache/commons/commons-parent/28",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/commons/commons-parent/28/commons-parent-28.pom"
|
||||||
|
],
|
||||||
|
"sha256": "14733a68e8b120b69de60cd96d222146dcf32f03c1c6cc6a750b1269bafe86c7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.httpcomponents",
|
||||||
|
"name": "httpclient",
|
||||||
|
"version": "4.3.6",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "httpclient-4.3.6.jar",
|
||||||
|
"path": "org/apache/httpcomponents/httpclient/4.3.6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar"
|
||||||
|
],
|
||||||
|
"sha256": "79838d9eaef73d4f852c63a480830c3a2d4b590f0ab3ae815a489463e4714004"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.httpcomponents",
|
||||||
|
"name": "httpclient",
|
||||||
|
"version": "4.3.6",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "httpclient-4.3.6.pom",
|
||||||
|
"path": "org/apache/httpcomponents/httpclient/4.3.6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.pom"
|
||||||
|
],
|
||||||
|
"sha256": "d02634f6131e914961c02aa836711ebac72704b27e26c5bd223bbad89b1b64c3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.httpcomponents",
|
||||||
|
"name": "httpcomponents-client",
|
||||||
|
"version": "4.3.6",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "httpcomponents-client-4.3.6.pom",
|
||||||
|
"path": "org/apache/httpcomponents/httpcomponents-client/4.3.6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcomponents-client/4.3.6/httpcomponents-client-4.3.6.pom"
|
||||||
|
],
|
||||||
|
"sha256": "4ada2827b496339826891c7c81dceba647029de6fc1888b16b3cab5650abcc63"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.httpcomponents",
|
||||||
|
"name": "httpcomponents-core",
|
||||||
|
"version": "4.3.3",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "httpcomponents-core-4.3.3.pom",
|
||||||
|
"path": "org/apache/httpcomponents/httpcomponents-core/4.3.3",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcomponents-core/4.3.3/httpcomponents-core-4.3.3.pom"
|
||||||
|
],
|
||||||
|
"sha256": "c16e2fc0d49ba7a02cef5b5e2600585a9f673553328a6f9e58f24296df1dd031"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.httpcomponents",
|
||||||
|
"name": "httpcore",
|
||||||
|
"version": "4.3.3",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "httpcore-4.3.3.jar",
|
||||||
|
"path": "org/apache/httpcomponents/httpcore/4.3.3",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar"
|
||||||
|
],
|
||||||
|
"sha256": "5285de80af1651c489313b91a9f40c65a4cdcb6b3bde716fcc028d16869a5a93"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.httpcomponents",
|
||||||
|
"name": "httpcore",
|
||||||
|
"version": "4.3.3",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "httpcore-4.3.3.pom",
|
||||||
|
"path": "org/apache/httpcomponents/httpcore/4.3.3",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.pom"
|
||||||
|
],
|
||||||
|
"sha256": "b427f7cf67c75a4e3f9e2108d35bf45303573c145ec778fcadcffacef17a1264"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.apache.httpcomponents",
|
||||||
|
"name": "project",
|
||||||
|
"version": "7",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "project-7.pom",
|
||||||
|
"path": "org/apache/httpcomponents/project/7",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/apache/httpcomponents/project/7/project-7.pom"
|
||||||
|
],
|
||||||
|
"sha256": "3d6eba428555a558de046b5d76eacc1f5a54b4f5f20b84d636ed7aff18aa48c3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.eclipse.jgit",
|
||||||
|
"name": "org.eclipse.jgit",
|
||||||
|
"version": "4.8.0.201706111038-r",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "org.eclipse.jgit-4.8.0.201706111038-r.jar",
|
||||||
|
"path": "org/eclipse/jgit/org.eclipse.jgit/4.8.0.201706111038-r",
|
||||||
|
"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"
|
||||||
|
],
|
||||||
|
"sha256": "49d912e8d5cce0dd08dca3d390189db8692a8f7e3363cdbbe182581462000aba"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.eclipse.jgit",
|
||||||
|
"name": "org.eclipse.jgit",
|
||||||
|
"version": "4.8.0.201706111038-r",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "org.eclipse.jgit-4.8.0.201706111038-r.pom",
|
||||||
|
"path": "org/eclipse/jgit/org.eclipse.jgit/4.8.0.201706111038-r",
|
||||||
|
"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"
|
||||||
|
],
|
||||||
|
"sha256": "a556a9f5adfc6af49b2a12e72dc3cd7e43db8fdc216c0f35885972a2f5ada27d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.eclipse.jgit",
|
||||||
|
"name": "org.eclipse.jgit-parent",
|
||||||
|
"version": "4.8.0.201706111038-r",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "org.eclipse.jgit-parent-4.8.0.201706111038-r.pom",
|
||||||
|
"path": "org/eclipse/jgit/org.eclipse.jgit-parent/4.8.0.201706111038-r",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit-parent/4.8.0.201706111038-r/org.eclipse.jgit-parent-4.8.0.201706111038-r.pom"
|
||||||
|
],
|
||||||
|
"sha256": "396a4cc894206873ff107d066a996252b0b47f585b88cf57fc3b31e93d492878"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.slf4j",
|
||||||
|
"name": "slf4j-api",
|
||||||
|
"version": "1.7.2",
|
||||||
|
"type": "jar",
|
||||||
|
"extension": "jar"
|
||||||
|
},
|
||||||
|
"name": "slf4j-api-1.7.2.jar",
|
||||||
|
"path": "org/slf4j/slf4j-api/1.7.2",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar"
|
||||||
|
],
|
||||||
|
"sha256": "3bae789b401333b2a1d1603b7fa573e19908628191707203f6eb708cdee2c052"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.slf4j",
|
||||||
|
"name": "slf4j-api",
|
||||||
|
"version": "1.7.2",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "slf4j-api-1.7.2.pom",
|
||||||
|
"path": "org/slf4j/slf4j-api/1.7.2",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom"
|
||||||
|
],
|
||||||
|
"sha256": "2eaca71afe0a1516f4abd8e9ff907838d268f38c81c3a542cce8d7f3b87c5d4c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.slf4j",
|
||||||
|
"name": "slf4j-parent",
|
||||||
|
"version": "1.7.2",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "slf4j-parent-1.7.2.pom",
|
||||||
|
"path": "org/slf4j/slf4j-parent/1.7.2",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/slf4j/slf4j-parent/1.7.2/slf4j-parent-1.7.2.pom"
|
||||||
|
],
|
||||||
|
"sha256": "1d8e084a6f2384ade42685332b52a0ece090478641dc14c0fa8c52e1e2984425"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.sonatype.oss",
|
||||||
|
"name": "oss-parent",
|
||||||
|
"version": "5",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "oss-parent-5.pom",
|
||||||
|
"path": "org/sonatype/oss/oss-parent/5",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/sonatype/oss/oss-parent/5/oss-parent-5.pom"
|
||||||
|
],
|
||||||
|
"sha256": "1678d4120a585d8a630131aeec4c524d928398583b7eab616ee7d5a87f520d3d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": {
|
||||||
|
"group": "org.sonatype.oss",
|
||||||
|
"name": "oss-parent",
|
||||||
|
"version": "6",
|
||||||
|
"type": "pom",
|
||||||
|
"extension": "pom"
|
||||||
|
},
|
||||||
|
"name": "oss-parent-6.pom",
|
||||||
|
"path": "org/sonatype/oss/oss-parent/6",
|
||||||
|
"urls": [
|
||||||
|
"https://plugins.gradle.org/m2/org/sonatype/oss/oss-parent/6/oss-parent-6.pom"
|
||||||
|
],
|
||||||
|
"sha256": "b4306d13e8f5392458a1b30866f1cff161b3d2e6999a88d059eea3932c8a8499"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plugin": [],
|
||||||
|
"buildscript": [],
|
||||||
|
"project": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# with (import <nixpkgs> {});
|
# with (import <nixpkgs> {});
|
||||||
# let
|
# let
|
||||||
# buildGradle = callPackage ./gradleEnv.nix {};
|
# buildGradle = callPackage ./gradle-env.nix {};
|
||||||
# in
|
# in
|
||||||
# buildGradle {
|
# buildGradle {
|
||||||
# envSpec = ./gradle-env.json;
|
# envSpec = ./gradle-env.json;
|
||||||
@@ -32,12 +32,12 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
filter sort replaceStrings attrValues match fromJSON
|
attrValues concatStringsSep filter fromJSON match replaceStrings sort;
|
||||||
concatStringsSep;
|
|
||||||
|
|
||||||
inherit (stdenv.lib)
|
inherit (stdenv.lib)
|
||||||
versionOlder unique mapAttrs last concatMapStringsSep removeSuffix
|
assertMsg concatMapStringsSep groupBy' hasSuffix last mapAttrs
|
||||||
optionalString groupBy' readFile hasSuffix;
|
mapAttrsToList optionalString readFile removeSuffix unique versionAtLeast
|
||||||
|
versionOlder;
|
||||||
|
|
||||||
mkDep = depSpec: stdenv.mkDerivation {
|
mkDep = depSpec: stdenv.mkDerivation {
|
||||||
inherit (depSpec) name;
|
inherit (depSpec) name;
|
||||||
@@ -176,10 +176,20 @@ let
|
|||||||
paths = map mkDep deps ++ mkModuleMetadata deps ++ mkSnapshotMetadata deps;
|
paths = map mkDep deps ++ mkModuleMetadata deps ++ mkSnapshotMetadata deps;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkInitScript = projectSpec:
|
mkInitScript = projectSpec: gradle:
|
||||||
let
|
let
|
||||||
repos = mapAttrs (mkRepo projectSpec.name) projectSpec.dependencies;
|
repos = mapAttrs (mkRepo projectSpec.name) projectSpec.dependencies;
|
||||||
|
hasDependencies = mapAttrs (type: deps: deps != []) projectSpec.dependencies;
|
||||||
in
|
in
|
||||||
|
assert (assertMsg (hasDependencies.settings -> versionAtLeast gradle.version "6.0") ''
|
||||||
|
Project `${projectSpec.name}' has settings script dependencies, such as settings
|
||||||
|
plugins, which are not supported by gradle2nix for Gradle versions prior to 6.0.
|
||||||
|
|
||||||
|
Potential remedies:
|
||||||
|
- Pass `--gradle-version=<version>' to the gradle2nix command.
|
||||||
|
- Patch the `settings.gradle[.kts]' file to remove script dependencies.
|
||||||
|
'');
|
||||||
|
|
||||||
writeText "init.gradle" ''
|
writeText "init.gradle" ''
|
||||||
static def offlineRepo(RepositoryHandler repositories, String env, String path) {
|
static def offlineRepo(RepositoryHandler repositories, String env, String path) {
|
||||||
repositories.clear()
|
repositories.clear()
|
||||||
@@ -204,18 +214,35 @@ let
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${optionalString (hasDependencies.settings && (versionAtLeast gradle.version "6.0")) ''
|
||||||
|
gradle.beforeSettings {
|
||||||
|
offlineRepo(it.buildscript.repositories, "settings", "${repos.settings}")
|
||||||
|
}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (hasDependencies.plugin) ''
|
||||||
gradle.settingsEvaluated {
|
gradle.settingsEvaluated {
|
||||||
offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}")
|
offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}")
|
||||||
}
|
}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (hasDependencies.buildscript) ''
|
||||||
gradle.projectsLoaded {
|
gradle.projectsLoaded {
|
||||||
allprojects {
|
allprojects {
|
||||||
buildscript {
|
buildscript {
|
||||||
offlineRepo(repositories, "buildscript", "${repos.buildscript}")
|
offlineRepo(repositories, "buildscript", "${repos.buildscript}")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (hasDependencies.project) ''
|
||||||
|
gradle.projectsLoaded {
|
||||||
|
allprojects {
|
||||||
offlineRepo(repositories, "project", "${repos.project}")
|
offlineRepo(repositories, "project", "${repos.project}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mkGradle = gradleSpec:
|
mkGradle = gradleSpec:
|
||||||
@@ -227,12 +254,14 @@ let
|
|||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
inherit (gradleSpec) url sha256;
|
inherit (gradleSpec) url sha256;
|
||||||
};
|
};
|
||||||
|
} // {
|
||||||
|
inherit (gradleSpec) version;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkProjectEnv = projectSpec: {
|
mkProjectEnv = projectSpec: rec {
|
||||||
inherit (projectSpec) name version;
|
inherit (projectSpec) name path version;
|
||||||
initScript = mkInitScript projectSpec;
|
|
||||||
gradle = args.gradlePackage or mkGradle projectSpec.gradle;
|
gradle = args.gradlePackage or mkGradle projectSpec.gradle;
|
||||||
|
initScript = mkInitScript projectSpec gradle;
|
||||||
};
|
};
|
||||||
|
|
||||||
gradleEnv = mapAttrs
|
gradleEnv = mapAttrs
|
||||||
@@ -243,6 +272,23 @@ let
|
|||||||
pname = args.pname or projectEnv.name;
|
pname = args.pname or projectEnv.name;
|
||||||
version = args.version or projectEnv.version;
|
version = args.version or projectEnv.version;
|
||||||
|
|
||||||
|
buildProject = env: flags: ''
|
||||||
|
gradle --offline --no-daemon --no-build-cache \
|
||||||
|
--info --full-stacktrace --warning-mode=all \
|
||||||
|
${optionalString enableParallelBuilding "--parallel"} \
|
||||||
|
${optionalString enableDebug "-Dorg.gradle.debug=true"} \
|
||||||
|
--init-script ${env.initScript} \
|
||||||
|
${optionalString (env.path != "") ''-p "${env.path}"''} \
|
||||||
|
${concatStringsSep " " flags}
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildIncludedProjects =
|
||||||
|
concatStringsSep "\n" (mapAttrsToList
|
||||||
|
(_: env: buildProject env [ "build" ])
|
||||||
|
(removeAttrs gradleEnv [ "" ]));
|
||||||
|
|
||||||
|
buildRootProject = buildProject projectEnv gradleFlags;
|
||||||
|
|
||||||
in stdenv.mkDerivation (args // {
|
in stdenv.mkDerivation (args // {
|
||||||
|
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
@@ -254,14 +300,15 @@ in stdenv.mkDerivation (args // {
|
|||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
env \
|
|
||||||
"GRADLE_USER_HOME=$(mktemp -d)" \
|
# use the init script here
|
||||||
gradle --offline --no-daemon --no-build-cache \
|
TMPHOME=$(mktemp -d)
|
||||||
--info --full-stacktrace --warning-mode=all \
|
mkdir -p $TMPHOME/init.d
|
||||||
${optionalString enableParallelBuilding "--parallel"} \
|
cp ${projectEnv.initScript} $TMPHOME/init.d
|
||||||
${optionalString enableDebug "-Dorg.gradle.debug=true"} \
|
|
||||||
--init-script ${projectEnv.initScript} \
|
export "GRADLE_USER_HOME=$TMPHOME"
|
||||||
${concatStringsSep " " gradleFlags}
|
${buildIncludedProjects}
|
||||||
|
${buildRootProject}
|
||||||
)
|
)
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
startingVersion = '1.0.0'
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url 'https://plugins.gradle.org/m2/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'gradle.plugin.net.vivin:gradle-semantic-build-versioning:4.0.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = "settings-buildscript"
|
||||||
|
|
||||||
|
//apply plugin: 'net.vivin.gradle-semantic-build-versioning'
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright 2020 the original author or authors.
|
||||||
|
~
|
||||||
|
~ Licensed 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
|
||||||
|
~
|
||||||
|
~ http://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 modelVersion="1.0.0">
|
||||||
|
<groupId>com.github.anuken</groupId>
|
||||||
|
<artifactId>packr</artifactId>
|
||||||
|
<version>-packr-1.2-g034efe5-114</version>
|
||||||
|
<versioning>
|
||||||
|
<snapshot>
|
||||||
|
<timestamp>packr-1.2-g034efe5</timestamp>
|
||||||
|
<buildNumber>114</buildNumber>
|
||||||
|
</snapshot>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
Binary file not shown.
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.github.anuken</groupId>
|
||||||
|
<artifactId>packr</artifactId>
|
||||||
|
<version>-SNAPSHOT</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.zeroturnaround</groupId>
|
||||||
|
<artifactId>zt-zip</artifactId>
|
||||||
|
<version>1.10</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.eclipsesource.minimal-json</groupId>
|
||||||
|
<artifactId>minimal-json</artifactId>
|
||||||
|
<version>0.9.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.lexicalscope.jewelcli</groupId>
|
||||||
|
<artifactId>jewelcli</artifactId>
|
||||||
|
<version>0.8.9</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
<version>1.6.6</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright 2020 the original author or authors.
|
||||||
|
~
|
||||||
|
~ Licensed 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
|
||||||
|
~
|
||||||
|
~ http://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 modelVersion="1.0.0">
|
||||||
|
<groupId>com.github.anuken</groupId>
|
||||||
|
<artifactId>packr</artifactId>
|
||||||
|
<versioning>
|
||||||
|
<release>packr-1.2</release>
|
||||||
|
<versions>
|
||||||
|
<version>packr-1.2</version>
|
||||||
|
</versions>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||||
|
#Thu Sep 24 11:23:49 PDT 2020
|
||||||
|
micrometer-bom-1.5.1.pom>maven-public=
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-bom</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-core</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-jersey2</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-appoptics</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-atlas</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-azure-monitor</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-cloudwatch</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-cloudwatch2</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-datadog</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-dynatrace</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-elastic</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-ganglia</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-graphite</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-humio</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-influx</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-jmx</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-kairos</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-new-relic</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-opentsdb</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-prometheus</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-signalfx</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-stackdriver</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-statsd</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-wavefront</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-test</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
<name>micrometer-bom</name>
|
||||||
|
<description>Micrometer BOM (Bill of Materials) for managing Micrometer artifact versions</description>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>The Apache Software License, Version 2.0</name>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<properties>
|
||||||
|
<nebula_Manifest_Version>1.0</nebula_Manifest_Version>
|
||||||
|
<nebula_Implementation_Title>io.micrometer#micrometer-bom;1.5.1</nebula_Implementation_Title>
|
||||||
|
<nebula_Implementation_Version>1.5.1</nebula_Implementation_Version>
|
||||||
|
<nebula_Built_Status>release</nebula_Built_Status>
|
||||||
|
<nebula_Built_By>circleci</nebula_Built_By>
|
||||||
|
<nebula_Built_OS>Linux</nebula_Built_OS>
|
||||||
|
<nebula_Build_Date>2020-05-08_16:43:24</nebula_Build_Date>
|
||||||
|
<nebula_Gradle_Version>6.4</nebula_Gradle_Version>
|
||||||
|
<nebula_Module_Source>/micrometer-bom</nebula_Module_Source>
|
||||||
|
<nebula_Module_Origin>git@github.com:micrometer-metrics/micrometer.git</nebula_Module_Origin>
|
||||||
|
<nebula_Change>5984c10</nebula_Change>
|
||||||
|
<nebula_Branch>5984c10fc12b781652e27a9ea95c439f96e73cf8</nebula_Branch>
|
||||||
|
<nebula_Build_Host>82db0d896427</nebula_Build_Host>
|
||||||
|
<nebula_Build_Job>LOCAL</nebula_Build_Job>
|
||||||
|
<nebula_Build_Number>LOCAL</nebula_Build_Number>
|
||||||
|
<nebula_Build_Id>LOCAL</nebula_Build_Id>
|
||||||
|
<nebula_Created_By>14.0.1+7 (Oracle Corporation)</nebula_Created_By>
|
||||||
|
<nebula_Build_Java_Version>14.0.1</nebula_Build_Java_Version>
|
||||||
|
<nebula_Module_Owner>tludwig@vmware.com</nebula_Module_Owner>
|
||||||
|
<nebula_Module_Email>tludwig@vmware.com</nebula_Module_Email>
|
||||||
|
</properties>
|
||||||
|
<url>https://github.com/micrometer-metrics/micrometer</url>
|
||||||
|
<scm>
|
||||||
|
<url>git@github.com:micrometer-metrics/micrometer.git</url>
|
||||||
|
</scm>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>shakuzen</id>
|
||||||
|
<name>Tommy Ludwig</name>
|
||||||
|
<email>tludwig@vmware.com</email>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
07e9957e505eb062485e8ba52d14620e38baf45d
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||||
|
#Sat Nov 21 19:26:36 PST 2020
|
||||||
|
micrometer-core-1.5.1.jar>central=
|
||||||
|
micrometer-core-1.5.1.pom>central=
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
f58ddf32310729011f6c2171fbe1a085b4336b2f
|
||||||
@@ -0,0 +1,239 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-core</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hdrhistogram</groupId>
|
||||||
|
<artifactId>HdrHistogram</artifactId>
|
||||||
|
<version>2.1.12</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.latencyutils</groupId>
|
||||||
|
<artifactId>LatencyUtils</artifactId>
|
||||||
|
<version>2.0.3</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>HdrHistogram</artifactId>
|
||||||
|
<groupId>org.hdrhistogram</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
|
<artifactId>jsr305</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.dropwizard.metrics</groupId>
|
||||||
|
<artifactId>metrics-core</artifactId>
|
||||||
|
<version>4.0.7</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.guava</groupId>
|
||||||
|
<artifactId>guava</artifactId>
|
||||||
|
<version>29.0-jre</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||||
|
<artifactId>caffeine</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.ehcache</groupId>
|
||||||
|
<artifactId>ehcache</artifactId>
|
||||||
|
<version>2.10.6</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.cache</groupId>
|
||||||
|
<artifactId>cache-api</artifactId>
|
||||||
|
<version>1.1.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.hazelcast</groupId>
|
||||||
|
<artifactId>hazelcast</artifactId>
|
||||||
|
<version>4.0.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<version>6.0.0.Alpha5</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-server</artifactId>
|
||||||
|
<version>9.4.28.v20200408</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-client</artifactId>
|
||||||
|
<version>9.4.28.v20200408</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-core</artifactId>
|
||||||
|
<version>8.5.54</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.5.12</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpasyncclient</artifactId>
|
||||||
|
<version>4.1.4</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.netflix.hystrix</groupId>
|
||||||
|
<artifactId>hystrix-core</artifactId>
|
||||||
|
<version>1.5.12</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
<version>1.2.3</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
<version>2.13.2</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.projectreactor</groupId>
|
||||||
|
<artifactId>reactor-core</artifactId>
|
||||||
|
<version>3.3.5.RELEASE</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.projectreactor.netty</groupId>
|
||||||
|
<artifactId>reactor-netty</artifactId>
|
||||||
|
<version>0.9.7.RELEASE</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.aspectj</groupId>
|
||||||
|
<artifactId>aspectjweaver</artifactId>
|
||||||
|
<version>1.8.14</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>4.5.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mongodb</groupId>
|
||||||
|
<artifactId>mongo-java-driver</artifactId>
|
||||||
|
<version>3.12.3</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jooq</groupId>
|
||||||
|
<artifactId>jooq</artifactId>
|
||||||
|
<version>3.13.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.kafka</groupId>
|
||||||
|
<artifactId>kafka-clients</artifactId>
|
||||||
|
<version>2.5.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.kafka</groupId>
|
||||||
|
<artifactId>kafka-streams</artifactId>
|
||||||
|
<version>2.5.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<name>micrometer-core</name>
|
||||||
|
<description>Application monitoring instrumentation facade</description>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>The Apache Software License, Version 2.0</name>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<properties>
|
||||||
|
<nebula_Manifest_Version>1.0</nebula_Manifest_Version>
|
||||||
|
<nebula_Implementation_Title>io.micrometer#micrometer-core;1.5.1</nebula_Implementation_Title>
|
||||||
|
<nebula_Implementation_Version>1.5.1</nebula_Implementation_Version>
|
||||||
|
<nebula_Built_Status>integration</nebula_Built_Status>
|
||||||
|
<nebula_Built_By>circleci</nebula_Built_By>
|
||||||
|
<nebula_Built_OS>Linux</nebula_Built_OS>
|
||||||
|
<nebula_Build_Date>2020-05-08_16:43:25</nebula_Build_Date>
|
||||||
|
<nebula_Gradle_Version>6.4</nebula_Gradle_Version>
|
||||||
|
<nebula_Module_Source>/micrometer-core</nebula_Module_Source>
|
||||||
|
<nebula_Module_Origin>git@github.com:micrometer-metrics/micrometer.git</nebula_Module_Origin>
|
||||||
|
<nebula_Change>5984c10</nebula_Change>
|
||||||
|
<nebula_Branch>5984c10fc12b781652e27a9ea95c439f96e73cf8</nebula_Branch>
|
||||||
|
<nebula_Build_Host>82db0d896427</nebula_Build_Host>
|
||||||
|
<nebula_Build_Job>LOCAL</nebula_Build_Job>
|
||||||
|
<nebula_Build_Number>LOCAL</nebula_Build_Number>
|
||||||
|
<nebula_Build_Id>LOCAL</nebula_Build_Id>
|
||||||
|
<nebula_Created_By>14.0.1+7 (Oracle Corporation)</nebula_Created_By>
|
||||||
|
<nebula_Build_Java_Version>14.0.1</nebula_Build_Java_Version>
|
||||||
|
<nebula_Module_Owner>tludwig@vmware.com</nebula_Module_Owner>
|
||||||
|
<nebula_Module_Email>tludwig@vmware.com</nebula_Module_Email>
|
||||||
|
<nebula_X_Compile_Target_JDK>14</nebula_X_Compile_Target_JDK>
|
||||||
|
<nebula_X_Compile_Source_JDK>14</nebula_X_Compile_Source_JDK>
|
||||||
|
</properties>
|
||||||
|
<url>https://github.com/micrometer-metrics/micrometer</url>
|
||||||
|
<scm>
|
||||||
|
<url>git@github.com:micrometer-metrics/micrometer.git</url>
|
||||||
|
</scm>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>shakuzen</id>
|
||||||
|
<name>Tommy Ludwig</name>
|
||||||
|
<email>tludwig@vmware.com</email>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
e68ba4ca00f195e4aa6a5ccd78feef2d24c578ca
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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>test-SNAPSHOT1</artifactId>
|
||||||
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
|
<versioning>
|
||||||
|
<snapshot>
|
||||||
|
<timestamp>20070310.181613</timestamp>
|
||||||
|
|
||||||
|
<buildNumber>3</buildNumber>
|
||||||
|
</snapshot>
|
||||||
|
<lastUpdated>20070310181754</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>test-SNAPSHOT1</artifactId>
|
||||||
|
<name>Test Module for Ivy M2 parsing</name>
|
||||||
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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>test-SNAPSHOT1</artifactId>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
<versioning>
|
||||||
|
<snapshot>
|
||||||
|
<timestamp>20070310.181613</timestamp>
|
||||||
|
|
||||||
|
<buildNumber>3</buildNumber>
|
||||||
|
</snapshot>
|
||||||
|
<lastUpdated>20070310181754</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>test-SNAPSHOT1</artifactId>
|
||||||
|
<name>Test Module for Ivy M2 parsing</name>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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>test-SNAPSHOT1</artifactId>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
<versioning>
|
||||||
|
<versions>
|
||||||
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
</versions>
|
||||||
|
|
||||||
|
<lastUpdated>20070310181754</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?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>test-SNAPSHOT2</artifactId>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
<versioning>
|
||||||
|
<snapshot>
|
||||||
|
<buildNumber>3</buildNumber>
|
||||||
|
</snapshot>
|
||||||
|
<lastUpdated>20070310181754</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>test-SNAPSHOT2</artifactId>
|
||||||
|
<name>Test Module for Ivy M2 parsing</name>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -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>test-SNAPSHOT2</artifactId>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
<versioning>
|
||||||
|
<versions>
|
||||||
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
|
</versions>
|
||||||
|
|
||||||
|
<lastUpdated>20070310181754</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
||||||
BIN
fixtures/repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar
Normal file
BIN
fixtures/repositories/m2/org/apache/test/1.0.0/test-1.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>1.0.0</version>
|
||||||
|
|
||||||
|
<name>test</name>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
test
|
||||||
|
</description>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
88e79ca0e696263e63bc9dc759a2e9c0d66e36d9
|
||||||
24
fixtures/repositories/m2/org/apache/test/maven-metadata.xml
Normal file
24
fixtures/repositories/m2/org/apache/test/maven-metadata.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?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>test</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</metadata>
|
||||||
@@ -0,0 +1,268 @@
|
|||||||
|
<?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.hdrhistogram</groupId>
|
||||||
|
<artifactId>HdrHistogram</artifactId>
|
||||||
|
<version>2.1.12</version>
|
||||||
|
|
||||||
|
<name>HdrHistogram</name>
|
||||||
|
|
||||||
|
<url>http://hdrhistogram.github.io/HdrHistogram/</url>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
HdrHistogram supports the recording and analyzing sampled data value
|
||||||
|
counts across a configurable integer value range with configurable value
|
||||||
|
precision within the range. Value precision is expressed as the number of
|
||||||
|
significant digits in the value recording, and provides control over value
|
||||||
|
quantization behavior across the value range and the subsequent value
|
||||||
|
resolution at any given level.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<comments>
|
||||||
|
* This code was Written by Gil Tene of Azul Systems, and released to the
|
||||||
|
* public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
</comments>
|
||||||
|
<name>Public Domain, per Creative Commons CC0</name>
|
||||||
|
<url>http://creativecommons.org/publicdomain/zero/1.0/</url>
|
||||||
|
</license>
|
||||||
|
<license>
|
||||||
|
<name>BSD-2-Clause</name>
|
||||||
|
<url>https://opensource.org/licenses/BSD-2-Clause</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>giltene</id>
|
||||||
|
<name>Gil Tene</name>
|
||||||
|
<url>https://github.com/giltene</url>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>scm:git:git://github.com/HdrHistogram/HdrHistogram.git</url>
|
||||||
|
<connection>scm:git:git://github.com/HdrHistogram/HdrHistogram.git</connection>
|
||||||
|
<developerConnection>scm:git:git@github.com:HdrHistogram/HdrHistogram.git</developerConnection>
|
||||||
|
<tag>HdrHistogram-2.1.12</tag>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
|
||||||
|
<issueManagement>
|
||||||
|
<url>https://github.com/HdrHistogram/HdrHistogram/issues</url>
|
||||||
|
<system>GitHub Issues</system>
|
||||||
|
</issueManagement>
|
||||||
|
|
||||||
|
<packaging>bundle</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<version.template.file>src/main/java/org/HdrHistogram/Version.java.template</version.template.file>
|
||||||
|
<version.file>src/main/java/org/HdrHistogram/Version.java</version.file>
|
||||||
|
|
||||||
|
<junit.version>4.12</junit.version>
|
||||||
|
<junit.jupiter.version>5.5.2</junit.jupiter.version>
|
||||||
|
<junit.vintage.version>5.5.2</junit.vintage.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>ossrh</id>
|
||||||
|
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.felix</groupId>
|
||||||
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
|
<version>2.5.3</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||||
|
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.0.0-M1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>2.2.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar-no-fork</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.7</source>
|
||||||
|
<target>1.7</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.0.0-M3</version>
|
||||||
|
<configuration>
|
||||||
|
<enableAssertions>false</enableAssertions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>2.5.3</version>
|
||||||
|
<configuration>
|
||||||
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||||
|
<useReleaseProfile>false</useReleaseProfile>
|
||||||
|
<releaseProfiles>release</releaseProfiles>
|
||||||
|
<goals>deploy</goals>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||||
|
<artifactId>maven-replacer-plugin</artifactId>
|
||||||
|
<version>1.4.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>replace</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<file>${version.template.file}</file>
|
||||||
|
<outputFile>${version.file}</outputFile>
|
||||||
|
<replacements>
|
||||||
|
<replacement>
|
||||||
|
<token>\$BUILD_TIME\$</token>
|
||||||
|
<value>${maven.build.timestamp}</value>
|
||||||
|
</replacement>
|
||||||
|
<replacement>
|
||||||
|
<token>\$VERSION\$</token>
|
||||||
|
<value>${project.version}</value>
|
||||||
|
</replacement>
|
||||||
|
</replacements>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>2.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-installed</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>${project.artifactId}</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>${project.packaging}</type>
|
||||||
|
<destFileName>HdrHistogram.jar</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
<outputDirectory>${project.basedir}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>sign-artifacts</id>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sign</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.plugins</groupId>
|
||||||
|
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||||
|
<version>1.6.7</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
<configuration>
|
||||||
|
<serverId>ossrh</serverId>
|
||||||
|
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||||
|
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
|
<version>${junit.jupiter.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-params</artifactId>
|
||||||
|
<version>${junit.jupiter.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-engine</artifactId>
|
||||||
|
<version>${junit.jupiter.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.vintage</groupId>
|
||||||
|
<artifactId>junit-vintage-engine</artifactId>
|
||||||
|
<version>${junit.vintage.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||||
|
#Sat Nov 21 19:26:36 PST 2020
|
||||||
|
HdrHistogram-2.1.12.jar>central=
|
||||||
|
HdrHistogram-2.1.12.pom>central=
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
769c0b82cb2421c8256300e907298a9410a2a3d3
|
||||||
@@ -0,0 +1,198 @@
|
|||||||
|
<?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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.sonatype.oss</groupId>
|
||||||
|
<artifactId>oss-parent</artifactId>
|
||||||
|
<version>7</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.latencyutils</groupId>
|
||||||
|
<artifactId>LatencyUtils</artifactId>
|
||||||
|
<version>2.0.3</version>
|
||||||
|
|
||||||
|
<name>LatencyUtils</name>
|
||||||
|
|
||||||
|
<url>http://latencyutils.github.io/LatencyUtils/</url>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
LatencyUtils is a package that provides latency recording and reporting utilities.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<comments>
|
||||||
|
* This code was Written by Gil Tene of Azul Systems, and released to the
|
||||||
|
* public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
</comments>
|
||||||
|
<name>Public Domain, per Creative Commons CC0</name>
|
||||||
|
<url>http://creativecommons.org/publicdomain/zero/1.0/</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>giltene</id>
|
||||||
|
<name>Gil Tene</name>
|
||||||
|
<url>https://github.com/giltene</url>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>scm:git:git://github.com/LatencyUtils/LatencyUtils.git</url>
|
||||||
|
<connection>scm:git:git://github.com/LatencyUtils/LatencyUtils.git</connection>
|
||||||
|
<developerConnection>scm:git:git@github.com:LatencyUtils/LatencyUtils.git</developerConnection>
|
||||||
|
<tag>HEAD</tag>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<issueManagement>
|
||||||
|
<url>https://github.com/LatencyUtils/LatencyUtils/issues</url>
|
||||||
|
<system>GitHub Issues</system>
|
||||||
|
</issueManagement>
|
||||||
|
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>ossrh</id>
|
||||||
|
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.9.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>2.2.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar-no-fork</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>2.3.2</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.6</source>
|
||||||
|
<target>1.6</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.12.4</version>
|
||||||
|
<configuration>
|
||||||
|
<enableAssertions>false</enableAssertions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<configuration>
|
||||||
|
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>2.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-installed</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>${project.artifactId}</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>${project.packaging}</type>
|
||||||
|
<destFileName>LatencyUtils.jar</destFileName>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
<outputDirectory>${project.basedir}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>release-sign-artifacts</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>performRelease</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
<configuration>
|
||||||
|
<passphrase>${gpg.passphrase}</passphrase>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>sign-artifacts</id>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sign</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.10</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hdrhistogram</groupId>
|
||||||
|
<artifactId>HdrHistogram</artifactId>
|
||||||
|
<version>2.1.8</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
5baec26b6f9e5b17fdd200fc20af85eead4287c4
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||||
|
#Sat Nov 21 19:26:36 PST 2020
|
||||||
|
LatencyUtils-2.0.3.jar>central=
|
||||||
|
LatencyUtils-2.0.3.jar>maven-public=
|
||||||
|
LatencyUtils-2.0.3.pom>maven-public=
|
||||||
|
LatencyUtils-2.0.3.pom>central=
|
||||||
17
fixtures/s3/maven-snapshot/groovy/build.gradle
Normal file
17
fixtures/s3/maven-snapshot/groovy/build.gradle
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id('java')
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url "s3://repositories/m2"
|
||||||
|
credentials(AwsCredentials) {
|
||||||
|
accessKey "foo"
|
||||||
|
secretKey "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test-SNAPSHOT1:2.0.0-SNAPSHOT")
|
||||||
|
}
|
||||||
0
fixtures/s3/maven-snapshot/groovy/settings.gradle
Normal file
0
fixtures/s3/maven-snapshot/groovy/settings.gradle
Normal file
17
fixtures/s3/maven-snapshot/kotlin/build.gradle.kts
Normal file
17
fixtures/s3/maven-snapshot/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("s3://repositories/m2")
|
||||||
|
credentials(AwsCredentials::class) {
|
||||||
|
accessKey = "foo"
|
||||||
|
secretKey = "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test-SNAPSHOT1:2.0.0-SNAPSHOT")
|
||||||
|
}
|
||||||
17
fixtures/s3/maven/groovy/build.gradle
Normal file
17
fixtures/s3/maven/groovy/build.gradle
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id('java')
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url "s3://repositories/m2"
|
||||||
|
credentials(AwsCredentials) {
|
||||||
|
accessKey "foo"
|
||||||
|
secretKey "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test:1.0.0")
|
||||||
|
}
|
||||||
0
fixtures/s3/maven/groovy/settings.gradle
Normal file
0
fixtures/s3/maven/groovy/settings.gradle
Normal file
17
fixtures/s3/maven/kotlin/build.gradle.kts
Normal file
17
fixtures/s3/maven/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("s3://repositories/m2")
|
||||||
|
credentials(AwsCredentials::class) {
|
||||||
|
accessKey = "foo"
|
||||||
|
secretKey = "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test:1.0.0")
|
||||||
|
}
|
||||||
0
fixtures/s3/maven/kotlin/settings.gradle.kts
Normal file
0
fixtures/s3/maven/kotlin/settings.gradle.kts
Normal file
10
fixtures/settings/buildscript/groovy/settings.gradle
Normal file
10
fixtures/settings/buildscript/groovy/settings.gradle
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url 'http://localhost:9999/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'org.apache:test:1.0.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test:1.0.0")
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
maven { url = uri("http://localhost:9999") }
|
||||||
|
}
|
||||||
|
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||||
|
}
|
||||||
43
flake.lock
generated
Normal file
43
flake.lock
generated
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1605370193,
|
||||||
|
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1607536117,
|
||||||
|
"narHash": "sha256-q3xr1fz93VNMnZjpqLN3VyphED2UxO6pd8jR8B4S+lo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b8936e55235bb4a970514d4bb9fbd77a2c16b806",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable-small",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
21
flake.nix
Normal file
21
flake.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
description = "Wrap Gradle builds with Nix";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, flake-utils, nixpkgs }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in rec {
|
||||||
|
packages.gradle2nix = import ./default.nix { inherit pkgs; };
|
||||||
|
defaultPackage = packages.gradle2nix;
|
||||||
|
|
||||||
|
apps.default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${packages.gradle2nix}/bin/gradle2nix";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
9359
gradle-env.json
9359
gradle-env.json
File diff suppressed because it is too large
Load Diff
188
gradle-env.nix
188
gradle-env.nix
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# with (import <nixpkgs> {});
|
# with (import <nixpkgs> {});
|
||||||
# let
|
# let
|
||||||
# buildGradle = callPackage ./gradleEnv.nix {};
|
# buildGradle = callPackage ./gradle-env.nix {};
|
||||||
# in
|
# in
|
||||||
# buildGradle {
|
# buildGradle {
|
||||||
# envSpec = ./gradle-env.json;
|
# envSpec = ./gradle-env.json;
|
||||||
@@ -19,38 +19,95 @@
|
|||||||
# '';
|
# '';
|
||||||
# }
|
# }
|
||||||
|
|
||||||
{ stdenv, buildEnv, fetchurl, gradleGen, writeText, writeTextDir }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, buildEnv
|
||||||
|
, fetchs3
|
||||||
|
, fetchurl
|
||||||
|
, gradleGen
|
||||||
|
, writeText
|
||||||
|
, writeTextDir
|
||||||
|
}:
|
||||||
|
|
||||||
{ envSpec
|
{
|
||||||
|
# Path to the environment spec generated by gradle2nix (e.g. gradle-env.json).
|
||||||
|
envSpec
|
||||||
, pname ? null
|
, pname ? null
|
||||||
, version ? null
|
, version ? null
|
||||||
, enableParallelBuilding ? true
|
, enableParallelBuilding ? true
|
||||||
|
# Arguments to Gradle used to build the project in buildPhase.
|
||||||
, gradleFlags ? [ "build" ]
|
, gradleFlags ? [ "build" ]
|
||||||
|
# Gradle package to use instead of the one generated by gradle2nix.
|
||||||
, gradlePackage ? null
|
, gradlePackage ? null
|
||||||
|
# Enable debugging for the Gradle build; this will cause Gradle to run a debug server
|
||||||
|
# and wait for a JVM debugging client to attach.
|
||||||
, enableDebug ? false
|
, enableDebug ? false
|
||||||
|
# Additional code to run in the Gradle init script (init.gradle).
|
||||||
|
, extraInit ? ""
|
||||||
|
# Override the default JDK used to run Gradle itself.
|
||||||
|
, buildJdk ? null
|
||||||
|
# Override functions which fetch dependency artifacts.
|
||||||
|
# Keys in this set are URL schemes such as "https" or "s3".
|
||||||
|
# Values are functions which take a dependency in the form
|
||||||
|
# `{ urls, sha256 }` and fetch into the Nix store. For example:
|
||||||
|
#
|
||||||
|
# {
|
||||||
|
# s3 = { urls, sha256 }: fetchs3 {
|
||||||
|
# s3url = builtins.head urls;
|
||||||
|
# inherit sha256;
|
||||||
|
# region = "us-west-2";
|
||||||
|
# credentials = {
|
||||||
|
# access_key_id = "foo";
|
||||||
|
# secret_access_key = "bar";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
, fetchers ? { }
|
||||||
, ... } @ args:
|
, ... } @ args:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
filter sort replaceStrings attrValues match fromJSON
|
attrValues concatStringsSep filter fromJSON getAttr head match
|
||||||
concatStringsSep;
|
replaceStrings sort;
|
||||||
|
|
||||||
inherit (stdenv.lib)
|
inherit (lib)
|
||||||
versionOlder unique mapAttrs last concatMapStringsSep removeSuffix
|
assertMsg concatMapStringsSep groupBy' hasSuffix hasPrefix last mapAttrs
|
||||||
optionalString groupBy' readFile hasSuffix;
|
mapAttrsToList optionalString readFile removeSuffix unique versionAtLeast
|
||||||
|
versionOlder;
|
||||||
|
|
||||||
mkDep = depSpec: stdenv.mkDerivation {
|
fetchers' = {
|
||||||
inherit (depSpec) name;
|
http = fetchurl;
|
||||||
|
https = fetchurl;
|
||||||
|
s3 = { urls, sha256 }: fetchs3 {
|
||||||
|
s3url = head urls;
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
} // fetchers;
|
||||||
|
|
||||||
src = fetchurl {
|
# Fetch urls using the scheme for the first entry only; there isn't a
|
||||||
inherit (depSpec) urls sha256;
|
# straightforward way to tell Nix to try multiple fetchers in turn
|
||||||
|
# and short-circuit on the first successful fetch.
|
||||||
|
fetch = { urls, sha256 }:
|
||||||
|
let
|
||||||
|
first = head urls;
|
||||||
|
scheme = head (builtins.match "([a-z0-9+.-]+)://.*" first);
|
||||||
|
fetch' = getAttr scheme fetchers';
|
||||||
|
urls' = filter (hasPrefix scheme) urls;
|
||||||
|
in
|
||||||
|
fetch' { urls = urls'; inherit sha256; };
|
||||||
|
|
||||||
|
mkDep = { name, path, urls, sha256, ... }: stdenv.mkDerivation {
|
||||||
|
inherit name;
|
||||||
|
|
||||||
|
src = fetch {
|
||||||
|
inherit urls sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = "installPhase";
|
phases = "installPhase";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/${depSpec.path}
|
mkdir -p $out/${path}
|
||||||
ln -s $src $out/${depSpec.path}/${depSpec.name}
|
ln -s $src $out/${path}/${name}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -176,10 +233,33 @@ let
|
|||||||
paths = map mkDep deps ++ mkModuleMetadata deps ++ mkSnapshotMetadata deps;
|
paths = map mkDep deps ++ mkModuleMetadata deps ++ mkSnapshotMetadata deps;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkInitScript = projectSpec:
|
mkInitScript = projectSpec: gradle:
|
||||||
let
|
let
|
||||||
repos = mapAttrs (mkRepo projectSpec.name) projectSpec.dependencies;
|
repos = mapAttrs (mkRepo projectSpec.name) projectSpec.dependencies;
|
||||||
|
hasDependencies = mapAttrs (type: deps: deps != []) projectSpec.dependencies;
|
||||||
|
|
||||||
|
inSettings = pred: script:
|
||||||
|
optionalString pred (
|
||||||
|
if versionAtLeast gradle.version "6.0" then ''
|
||||||
|
gradle.beforeSettings {
|
||||||
|
${script}
|
||||||
|
}
|
||||||
|
'' else ''
|
||||||
|
gradle.settingsEvaluated {
|
||||||
|
${script}
|
||||||
|
}
|
||||||
|
''
|
||||||
|
);
|
||||||
in
|
in
|
||||||
|
assert (assertMsg (hasDependencies.settings -> versionAtLeast gradle.version "6.0") ''
|
||||||
|
Project `${projectSpec.name}' has settings script dependencies, such as settings
|
||||||
|
plugins, which are not supported by gradle2nix for Gradle versions prior to 6.0.
|
||||||
|
|
||||||
|
Potential remedies:
|
||||||
|
- Pass `--gradle-version=<version>' to the gradle2nix command.
|
||||||
|
- Patch the `settings.gradle[.kts]' file to remove script dependencies.
|
||||||
|
'');
|
||||||
|
|
||||||
writeText "init.gradle" ''
|
writeText "init.gradle" ''
|
||||||
static def offlineRepo(RepositoryHandler repositories, String env, String path) {
|
static def offlineRepo(RepositoryHandler repositories, String env, String path) {
|
||||||
repositories.clear()
|
repositories.clear()
|
||||||
@@ -204,18 +284,44 @@ let
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gradle.settingsEvaluated {
|
${inSettings (hasDependencies.settings && (versionAtLeast gradle.version "6.0")) ''
|
||||||
offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}")
|
offlineRepo(it.buildscript.repositories, "settings", "${repos.settings}")
|
||||||
}
|
''}
|
||||||
|
|
||||||
|
${inSettings (hasDependencies.plugin) ''
|
||||||
|
offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}")
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (hasDependencies.buildscript) ''
|
||||||
gradle.projectsLoaded {
|
gradle.projectsLoaded {
|
||||||
allprojects {
|
allprojects {
|
||||||
buildscript {
|
buildscript {
|
||||||
offlineRepo(repositories, "buildscript", "${repos.buildscript}")
|
offlineRepo(repositories, "buildscript", "${repos.buildscript}")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (hasDependencies.project) (
|
||||||
|
if versionAtLeast gradle.version "6.8"
|
||||||
|
then ''
|
||||||
|
gradle.beforeSettings {
|
||||||
|
it.dependencyResolutionManagement {
|
||||||
|
offlineRepo(repositories, "project", "${repos.project}")
|
||||||
|
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''
|
||||||
|
else ''
|
||||||
|
gradle.projectsLoaded {
|
||||||
|
allprojects {
|
||||||
offlineRepo(repositories, "project", "${repos.project}")
|
offlineRepo(repositories, "project", "${repos.project}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
''
|
||||||
|
)}
|
||||||
|
|
||||||
|
${extraInit}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mkGradle = gradleSpec:
|
mkGradle = gradleSpec:
|
||||||
@@ -227,12 +333,14 @@ let
|
|||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
inherit (gradleSpec) url sha256;
|
inherit (gradleSpec) url sha256;
|
||||||
};
|
};
|
||||||
|
} // {
|
||||||
|
inherit (gradleSpec) version;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkProjectEnv = projectSpec: {
|
mkProjectEnv = projectSpec: rec {
|
||||||
inherit (projectSpec) name version;
|
inherit (projectSpec) name path version;
|
||||||
initScript = mkInitScript projectSpec;
|
|
||||||
gradle = args.gradlePackage or mkGradle projectSpec.gradle;
|
gradle = args.gradlePackage or mkGradle projectSpec.gradle;
|
||||||
|
initScript = mkInitScript projectSpec gradle;
|
||||||
};
|
};
|
||||||
|
|
||||||
gradleEnv = mapAttrs
|
gradleEnv = mapAttrs
|
||||||
@@ -243,6 +351,26 @@ let
|
|||||||
pname = args.pname or projectEnv.name;
|
pname = args.pname or projectEnv.name;
|
||||||
version = args.version or projectEnv.version;
|
version = args.version or projectEnv.version;
|
||||||
|
|
||||||
|
buildProject = env: flags: ''
|
||||||
|
cp ${env.initScript} "$GRADLE_USER_HOME/init.d"
|
||||||
|
|
||||||
|
gradle --offline --no-daemon --no-build-cache \
|
||||||
|
--info --full-stacktrace --warning-mode=all \
|
||||||
|
${optionalString enableParallelBuilding "--parallel"} \
|
||||||
|
${optionalString enableDebug "-Dorg.gradle.debug=true"} \
|
||||||
|
${optionalString (buildJdk != null) "-Dorg.gradle.java.home=${buildJdk.home}"} \
|
||||||
|
--init-script ${env.initScript} \
|
||||||
|
${optionalString (env.path != "") ''-p "${env.path}"''} \
|
||||||
|
${concatStringsSep " " flags}
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildIncludedProjects =
|
||||||
|
concatStringsSep "\n" (mapAttrsToList
|
||||||
|
(_: env: buildProject env [ "build" ])
|
||||||
|
(removeAttrs gradleEnv [ "" ]));
|
||||||
|
|
||||||
|
buildRootProject = buildProject projectEnv gradleFlags;
|
||||||
|
|
||||||
in stdenv.mkDerivation (args // {
|
in stdenv.mkDerivation (args // {
|
||||||
|
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
@@ -253,15 +381,15 @@ in stdenv.mkDerivation (args // {
|
|||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -eux
|
||||||
env \
|
|
||||||
"GRADLE_USER_HOME=$(mktemp -d)" \
|
# Work around https://github.com/gradle/gradle/issues/1055
|
||||||
gradle --offline --no-daemon --no-build-cache \
|
TMPHOME="$(mktemp -d)"
|
||||||
--info --full-stacktrace --warning-mode=all \
|
mkdir -p "$TMPHOME/init.d"
|
||||||
${optionalString enableParallelBuilding "--parallel"} \
|
export GRADLE_USER_HOME="$TMPHOME"
|
||||||
${optionalString enableDebug "-Dorg.gradle.debug=true"} \
|
|
||||||
--init-script ${projectEnv.initScript} \
|
${buildIncludedProjects}
|
||||||
${concatStringsSep " " gradleFlags}
|
${buildRootProject}
|
||||||
)
|
)
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
||||||
|
|
||||||
VERSION=1.0.0-rc1
|
VERSION=1.0.0-rc2
|
||||||
|
|
||||||
|
shadowVersion=6.1.0
|
||||||
|
stutterVersion=0.6.0
|
||||||
52
gradle/dependency-locks/settings-classpath.lockfile
Normal file
52
gradle/dependency-locks/settings-classpath.lockfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# This is a Gradle generated file for dependency locking.
|
||||||
|
# Manual edits can break the build and are not advised.
|
||||||
|
# This file is expected to be part of source control.
|
||||||
|
com.fasterxml.jackson.core:jackson-annotations:2.12.1
|
||||||
|
com.fasterxml.jackson.core:jackson-core:2.12.1
|
||||||
|
com.fasterxml.jackson.core:jackson-databind:2.12.1
|
||||||
|
com.fasterxml.jackson:jackson-bom:2.12.1
|
||||||
|
com.github.gundy:semver4j:0.16.4
|
||||||
|
com.github.jengelman.gradle.plugins:shadow:6.1.0
|
||||||
|
com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:6.1.0
|
||||||
|
com.google.code.gson:gson:2.8.6
|
||||||
|
commons-io:commons-io:2.6
|
||||||
|
de.undercouch:gradle-download-task:4.0.2
|
||||||
|
org.ajoberstar.stutter:org.ajoberstar.stutter.gradle.plugin:0.6.0
|
||||||
|
org.ajoberstar:gradle-stutter:0.6.0
|
||||||
|
org.antlr:antlr4-runtime:4.5.2-1
|
||||||
|
org.apache.ant:ant-launcher:1.9.7
|
||||||
|
org.apache.ant:ant:1.9.7
|
||||||
|
org.apache.logging.log4j:log4j-api:2.13.3
|
||||||
|
org.apache.logging.log4j:log4j-core:2.13.3
|
||||||
|
org.codehaus.plexus:plexus-utils:3.0.24
|
||||||
|
org.jdom:jdom2:2.0.6
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20181211
|
||||||
|
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.4.20
|
||||||
|
org.jetbrains.kotlin.kapt:org.jetbrains.kotlin.kapt.gradle.plugin:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-android-extensions:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-build-common:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-runner:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-client:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-reflect:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-script-runtime:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-common:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-util-io:1.4.20
|
||||||
|
org.jetbrains.kotlin:kotlin-util-klib:1.4.20
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7
|
||||||
|
org.jetbrains:annotations:13.0
|
||||||
|
org.ow2.asm:asm-analysis:9.0
|
||||||
|
org.ow2.asm:asm-commons:9.0
|
||||||
|
org.ow2.asm:asm-tree:9.0
|
||||||
|
org.ow2.asm:asm:9.0
|
||||||
|
org.vafer:jdependency:2.1.1
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
2
gradlew
vendored
2
gradlew
vendored
@@ -82,6 +82,7 @@ esac
|
|||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
@@ -129,6 +130,7 @@ fi
|
|||||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
|||||||
25
gradlew.bat
vendored
25
gradlew.bat
vendored
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
@@ -51,7 +54,7 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
@@ -61,28 +64,14 @@ echo location of your Java installation.
|
|||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
|
||||||
@rem Get command-line arguments, handling Windows variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
24
ivy/build.gradle.kts
Normal file
24
ivy/build.gradle.kts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api("org.apache.ivy:ivy:latest.release")
|
||||||
|
api("com.amazonaws:aws-java-sdk-s3:latest.release")
|
||||||
|
|
||||||
|
testImplementation("com.adobe.testing:s3mock-junit5:latest.release")
|
||||||
|
testImplementation("io.strikt:strikt-core:latest.release")
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter-api:latest.release")
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter-params:latest.release")
|
||||||
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:latest.release")
|
||||||
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:latest.release")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
test {
|
||||||
|
useJUnitPlatform {
|
||||||
|
includeEngines("junit-jupiter")
|
||||||
|
}
|
||||||
|
systemProperty("fixtures", "$rootDir/fixtures")
|
||||||
|
}
|
||||||
|
}
|
||||||
123
ivy/gradle.lockfile
Normal file
123
ivy/gradle.lockfile
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
# This is a Gradle generated file for dependency locking.
|
||||||
|
# Manual edits can break the build and are not advised.
|
||||||
|
# This file is expected to be part of source control.
|
||||||
|
ch.qos.logback:logback-classic:1.2.3=testCompileClasspath,testRuntimeClasspath
|
||||||
|
ch.qos.logback:logback-core:1.2.3=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.adobe.testing:s3mock-junit5:2.1.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.adobe.testing:s3mock-testsupport-common:2.1.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.adobe.testing:s3mock:2.1.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:aws-java-sdk-core:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:aws-java-sdk-kms:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:aws-java-sdk-s3:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:jmespath-java:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.christophsturm:filepeek:0.1.2=testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-annotations:2.6.0=compileClasspath,runtimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-annotations:2.9.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-core:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-databind:2.6.7.4=compileClasspath,runtimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-databind:2.9.9.3=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.woodstox:woodstox-core:5.1.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml:classmate:1.3.4=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.typesafe.netty:netty-reactive-streams-http:2.0.0=testRuntimeClasspath
|
||||||
|
com.typesafe.netty:netty-reactive-streams:2.0.0=testRuntimeClasspath
|
||||||
|
commons-codec:commons-codec:1.11=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
commons-io:commons-io:2.6=testCompileClasspath,testRuntimeClasspath
|
||||||
|
commons-logging:commons-logging:1.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
io.netty:netty-buffer:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-codec-http2:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-codec-http:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-codec:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-common:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-handler:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-resolver:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-transport-native-epoll:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-transport-native-unix-common:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-transport:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.strikt:strikt-core:0.28.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
javax.annotation:javax.annotation-api:1.3.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
javax.servlet:javax.servlet-api:3.1.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
javax.validation:validation-api:2.0.1.Final=testCompileClasspath,testRuntimeClasspath
|
||||||
|
joda-time:joda-time:2.8.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.commons:commons-lang3:3.8.1=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpclient:4.5.13=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpcore:4.4.13=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.ivy:ivy:2.5.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.logging.log4j:log4j-api:2.11.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.logging.log4j:log4j-to-slf4j:2.11.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.codehaus.woodstox:stax2-api:4.1=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-continuation:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-http:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-io:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-security:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-server:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-servlet:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-servlets:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-util:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-webapp:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-xml:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.hibernate.validator:hibernate-validator:6.0.17.Final=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jboss.logging:jboss-logging:3.3.2.Final=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-reflect:1.4.21-2=testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.2=testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2=testRuntimeClasspath
|
||||||
|
org.jetbrains:annotations:13.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-engine:5.7.0=testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-params:5.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-commons:1.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-engine:1.7.0=testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-launcher:1.7.0=testRuntimeClasspath
|
||||||
|
org.junit:junit-bom:5.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.mortbay.jasper:apache-el:8.5.40=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.reactivestreams:reactive-streams:1.0.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.slf4j:jul-to-slf4j:1.7.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.slf4j:slf4j-api:1.7.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-autoconfigure:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-jetty:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-json:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-logging:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-web:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-aop:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-beans:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-context:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-core:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-expression:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-jcl:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-web:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-webmvc:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.yaml:snakeyaml:1.23=testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:annotations:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:apache-client:2.7.19=testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:auth:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-core:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-query-protocol:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-xml-protocol:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:http-client-spi:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:netty-nio-client:2.7.19=testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:profiles:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:protocol-core:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:regions:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:s3:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:sdk-core:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:url-connection-client:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:utils:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.eventstream:eventstream:1.0.1=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.ion:ion-java:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
empty=
|
||||||
294
ivy/src/main/kotlin/org/nixos/gradle2nix/S3.kt
Normal file
294
ivy/src/main/kotlin/org/nixos/gradle2nix/S3.kt
Normal file
@@ -0,0 +1,294 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import com.amazonaws.AmazonServiceException
|
||||||
|
import com.amazonaws.ClientConfiguration
|
||||||
|
import com.amazonaws.auth.AWSCredentials
|
||||||
|
import com.amazonaws.auth.AWSStaticCredentialsProvider
|
||||||
|
import com.amazonaws.client.builder.AwsClientBuilder
|
||||||
|
import com.amazonaws.regions.Region
|
||||||
|
import com.amazonaws.regions.RegionUtils
|
||||||
|
import com.amazonaws.regions.Regions
|
||||||
|
import com.amazonaws.services.s3.AmazonS3
|
||||||
|
import com.amazonaws.services.s3.AmazonS3ClientBuilder
|
||||||
|
import com.amazonaws.services.s3.model.GetObjectRequest
|
||||||
|
import com.amazonaws.services.s3.model.ListObjectsRequest
|
||||||
|
import com.amazonaws.services.s3.model.ObjectMetadata
|
||||||
|
import com.amazonaws.services.s3.model.S3Object
|
||||||
|
import com.amazonaws.services.s3.model.S3ObjectInputStream
|
||||||
|
import com.amazonaws.util.AwsHostNameUtils
|
||||||
|
import org.apache.http.conn.ssl.NoopHostnameVerifier
|
||||||
|
import org.apache.http.conn.ssl.SSLConnectionSocketFactory
|
||||||
|
import org.apache.ivy.core.settings.TimeoutConstraint
|
||||||
|
import org.apache.ivy.plugins.repository.AbstractRepository
|
||||||
|
import org.apache.ivy.plugins.repository.RepositoryCopyProgressListener
|
||||||
|
import org.apache.ivy.plugins.repository.Resource
|
||||||
|
import org.apache.ivy.plugins.repository.TransferEvent
|
||||||
|
import org.apache.ivy.util.FileUtil
|
||||||
|
import java.io.File
|
||||||
|
import java.io.FileOutputStream
|
||||||
|
import java.io.IOException
|
||||||
|
import java.io.InputStream
|
||||||
|
import java.net.Socket
|
||||||
|
import java.net.URI
|
||||||
|
import java.security.KeyManagementException
|
||||||
|
import java.security.NoSuchAlgorithmException
|
||||||
|
import java.security.SecureRandom
|
||||||
|
import java.security.cert.X509Certificate
|
||||||
|
import javax.net.ssl.SSLContext
|
||||||
|
import javax.net.ssl.SSLEngine
|
||||||
|
import javax.net.ssl.TrustManager
|
||||||
|
import javax.net.ssl.X509ExtendedTrustManager
|
||||||
|
|
||||||
|
|
||||||
|
class S3Repository(
|
||||||
|
private val client: AmazonS3,
|
||||||
|
timeoutConstraint: TimeoutConstraint? = null
|
||||||
|
) : AbstractRepository(timeoutConstraint) {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
credentials: AWSCredentials?,
|
||||||
|
endpoint: URI?,
|
||||||
|
timeoutConstraint: TimeoutConstraint?
|
||||||
|
) : this(
|
||||||
|
AmazonS3ClientBuilder.standard().apply {
|
||||||
|
credentials?.let { setCredentials(AWSStaticCredentialsProvider(it)) }
|
||||||
|
|
||||||
|
if (endpoint != null) {
|
||||||
|
setEndpointConfiguration(
|
||||||
|
AwsClientBuilder.EndpointConfiguration(
|
||||||
|
endpoint.toString(),
|
||||||
|
AwsHostNameUtils.parseRegion(endpoint.host, null) ?: Regions.US_EAST_1.name
|
||||||
|
)
|
||||||
|
)
|
||||||
|
isChunkedEncodingDisabled = true
|
||||||
|
isPathStyleAccessEnabled = true
|
||||||
|
} else {
|
||||||
|
region = Regions.US_EAST_1.name
|
||||||
|
}
|
||||||
|
|
||||||
|
if (System.getProperty("org.nixos.gradle2nix.s3test") != null) {
|
||||||
|
clientConfiguration = ClientConfiguration().apply {
|
||||||
|
apacheHttpClientConfig.sslSocketFactory = SSLConnectionSocketFactory(
|
||||||
|
createBlindlyTrustingSslContext(),
|
||||||
|
NoopHostnameVerifier.INSTANCE
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.build(),
|
||||||
|
timeoutConstraint
|
||||||
|
)
|
||||||
|
|
||||||
|
private val cache = mutableMapOf<String, S3Resource>()
|
||||||
|
|
||||||
|
private val progress = RepositoryCopyProgressListener(this)
|
||||||
|
|
||||||
|
override fun getResource(source: String): Resource =
|
||||||
|
cache.getOrPut(source) { S3Resource(this, URI(source)) }
|
||||||
|
|
||||||
|
override fun get(source: String, destination: File) {
|
||||||
|
fireTransferInitiated(getResource(source), TransferEvent.REQUEST_GET)
|
||||||
|
try {
|
||||||
|
val res = getResource(source)
|
||||||
|
val totalLength = res.contentLength
|
||||||
|
if (totalLength > 0) {
|
||||||
|
progress.totalLength = totalLength
|
||||||
|
}
|
||||||
|
destination.parentFile?.mkdirs()
|
||||||
|
FileUtil.copy(
|
||||||
|
res.openStream(),
|
||||||
|
FileOutputStream(destination),
|
||||||
|
progress,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
fireTransferCompleted(res.contentLength)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
fireTransferError(e)
|
||||||
|
throw e
|
||||||
|
} finally {
|
||||||
|
progress.totalLength = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun list(parent: String): List<String> =
|
||||||
|
S3Resource(this, URI(parent))
|
||||||
|
.let { resource ->
|
||||||
|
generateSequence({
|
||||||
|
try {
|
||||||
|
withClient(resource) {
|
||||||
|
listObjects(
|
||||||
|
ListObjectsRequest()
|
||||||
|
.withBucketName(resource.bucket)
|
||||||
|
.withPrefix(resource.key)
|
||||||
|
.withDelimiter("/")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
throw S3RepositoryException(e)
|
||||||
|
}
|
||||||
|
}) { prev ->
|
||||||
|
if (!prev.isTruncated) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
withClient(resource) {
|
||||||
|
listNextBatchOfObjects(prev)
|
||||||
|
}
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
throw S3RepositoryException(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.flatMap { listing ->
|
||||||
|
listing.commonPrefixes.asSequence() +
|
||||||
|
listing.objectSummaries.asSequence().map { it.key }
|
||||||
|
}
|
||||||
|
.toList()
|
||||||
|
|
||||||
|
internal fun <T> withClient(
|
||||||
|
resource: S3Resource,
|
||||||
|
block: AmazonS3.() -> T
|
||||||
|
): T = client.apply {
|
||||||
|
resource.region?.let { setRegion(it) }
|
||||||
|
}.block()
|
||||||
|
}
|
||||||
|
|
||||||
|
class S3Resource(
|
||||||
|
private val repository: S3Repository,
|
||||||
|
private val url: URI
|
||||||
|
) : Resource {
|
||||||
|
|
||||||
|
private val source: Source by lazy {
|
||||||
|
REGIONAL_ENDPOINT_PATTERN.find(url.normalize().toString())
|
||||||
|
?.let {
|
||||||
|
val (bucket, region, _, key) = it.destructured
|
||||||
|
Source(
|
||||||
|
bucket = bucket,
|
||||||
|
key = key,
|
||||||
|
region = when (region) {
|
||||||
|
"external-1" -> Region.getRegion(Regions.US_EAST_1)
|
||||||
|
else -> RegionUtils.getRegion(region)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
?: Source(
|
||||||
|
bucket = url.bucket(),
|
||||||
|
key = url.key(),
|
||||||
|
region = null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val metadata: Metadata by lazy {
|
||||||
|
try {
|
||||||
|
getMetadata()
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
null
|
||||||
|
}?.let { meta ->
|
||||||
|
Metadata(
|
||||||
|
exists = true,
|
||||||
|
contentLength = meta.contentLength,
|
||||||
|
lastModified = meta.lastModified.time
|
||||||
|
)
|
||||||
|
} ?: Metadata(
|
||||||
|
exists = false,
|
||||||
|
contentLength = 0,
|
||||||
|
lastModified = 0
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
val bucket: String get() = source.bucket
|
||||||
|
|
||||||
|
val key: String get() = source.key
|
||||||
|
|
||||||
|
val region: Region? get() = source.region
|
||||||
|
|
||||||
|
override fun getName(): String = url.toString()
|
||||||
|
|
||||||
|
override fun getLastModified(): Long = metadata.lastModified
|
||||||
|
|
||||||
|
override fun getContentLength(): Long = metadata.contentLength
|
||||||
|
|
||||||
|
override fun exists(): Boolean = metadata.exists
|
||||||
|
|
||||||
|
override fun isLocal(): Boolean = false
|
||||||
|
|
||||||
|
override fun clone(cloneName: String): Resource = S3Resource(repository, URI(cloneName))
|
||||||
|
|
||||||
|
override fun openStream(): InputStream =
|
||||||
|
try { getContent() }
|
||||||
|
catch (e: AmazonServiceException) { throw S3RepositoryException(e) }
|
||||||
|
?: throw S3RepositoryException()
|
||||||
|
|
||||||
|
private fun getMetadata(): ObjectMetadata? =
|
||||||
|
getObject(withContent = false)?.objectMetadata
|
||||||
|
|
||||||
|
private fun getContent(): S3ObjectInputStream? =
|
||||||
|
getObject(withContent = true)?.objectContent
|
||||||
|
|
||||||
|
private fun getObject(withContent: Boolean = true): S3Object? {
|
||||||
|
val request = GetObjectRequest(bucket, key)
|
||||||
|
if (!withContent) {
|
||||||
|
request.setRange(0, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return try {
|
||||||
|
repository.withClient(this) { getObject(request) }
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
val errorCode = e.errorCode
|
||||||
|
if (errorCode != null && "NoSuchKey".compareTo(errorCode, ignoreCase = true) == 0) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
|
e.printStackTrace()
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private data class Source(
|
||||||
|
val bucket: String,
|
||||||
|
val key: String,
|
||||||
|
val region: Region?
|
||||||
|
)
|
||||||
|
|
||||||
|
private data class Metadata(
|
||||||
|
val exists: Boolean,
|
||||||
|
val contentLength: Long,
|
||||||
|
val lastModified: Long
|
||||||
|
)
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val REGIONAL_ENDPOINT_PATTERN =
|
||||||
|
Regex("""^s3://(.+)?\.s3[.-]([a-z0-9-]+)\.amazonaws\.com(\.[a-z]+)?/(.+)""")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class S3RepositoryException : RuntimeException {
|
||||||
|
constructor() : super()
|
||||||
|
|
||||||
|
constructor(throwable: Throwable) : super(throwable)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun URI.bucket(): String = normalize().host
|
||||||
|
|
||||||
|
private fun URI.key(): String = normalize().path.removePrefix("/")
|
||||||
|
|
||||||
|
// Used for testing.
|
||||||
|
private fun createBlindlyTrustingSslContext(): SSLContext? {
|
||||||
|
return try {
|
||||||
|
SSLContext.getInstance("TLS").apply {
|
||||||
|
init(null, arrayOf<TrustManager>(object : X509ExtendedTrustManager() {
|
||||||
|
override fun getAcceptedIssuers(): Array<X509Certificate>? = null
|
||||||
|
override fun checkClientTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: Socket?) {}
|
||||||
|
override fun checkClientTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: SSLEngine?) {}
|
||||||
|
override fun checkClientTrusted(certs: Array<X509Certificate?>?, authType: String?) {}
|
||||||
|
override fun checkServerTrusted(certs: Array<X509Certificate?>?, authType: String?) {}
|
||||||
|
override fun checkServerTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: Socket?) {}
|
||||||
|
override fun checkServerTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: SSLEngine?) {}
|
||||||
|
}), SecureRandom())
|
||||||
|
}
|
||||||
|
} catch (e: NoSuchAlgorithmException) {
|
||||||
|
throw RuntimeException("Unexpected exception", e)
|
||||||
|
} catch (e: KeyManagementException) {
|
||||||
|
throw RuntimeException("Unexpected exception", e)
|
||||||
|
}
|
||||||
|
}
|
||||||
113
ivy/src/test/kotlin/org/nixos/gradle2nix/S3Test.kt
Normal file
113
ivy/src/test/kotlin/org/nixos/gradle2nix/S3Test.kt
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import com.adobe.testing.s3mock.junit5.S3MockExtension
|
||||||
|
import com.amazonaws.services.s3.AmazonS3
|
||||||
|
import org.apache.ivy.ant.IvyDependencyArtifact
|
||||||
|
import org.apache.ivy.core.module.descriptor.Artifact
|
||||||
|
import org.apache.ivy.core.module.descriptor.DefaultArtifact
|
||||||
|
import org.apache.ivy.core.module.id.ArtifactRevisionId
|
||||||
|
import org.apache.ivy.core.module.id.ModuleRevisionId
|
||||||
|
import org.apache.ivy.core.settings.IvySettings
|
||||||
|
import org.apache.ivy.plugins.repository.Resource
|
||||||
|
import org.apache.ivy.plugins.resolver.IBiblioResolver
|
||||||
|
import org.apache.ivy.plugins.resolver.URLResolver
|
||||||
|
import org.junit.jupiter.api.BeforeAll
|
||||||
|
import org.junit.jupiter.api.Test
|
||||||
|
import org.junit.jupiter.api.TestInstance
|
||||||
|
import org.junit.jupiter.api.extension.RegisterExtension
|
||||||
|
import strikt.api.expectThat
|
||||||
|
import strikt.assertions.containsExactly
|
||||||
|
import strikt.assertions.isEmpty
|
||||||
|
import strikt.assertions.isEqualTo
|
||||||
|
import strikt.assertions.isFalse
|
||||||
|
import strikt.assertions.isNotEqualTo
|
||||||
|
import strikt.assertions.isNotNull
|
||||||
|
import strikt.assertions.isTrue
|
||||||
|
import java.io.File
|
||||||
|
import java.net.URI
|
||||||
|
import kotlin.io.path.ExperimentalPathApi
|
||||||
|
import kotlin.io.path.createTempDirectory
|
||||||
|
|
||||||
|
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||||
|
class S3Test {
|
||||||
|
companion object {
|
||||||
|
const val bucket = "repositories"
|
||||||
|
|
||||||
|
val fixtureRoot = File(System.getProperty("fixtures")).resolve(bucket)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
@RegisterExtension
|
||||||
|
val s3mock: S3MockExtension = S3MockExtension.builder().withInitialBuckets(bucket).build()
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
fun populateBucket(client: AmazonS3) {
|
||||||
|
fixtureRoot.walkTopDown()
|
||||||
|
.filter { it.isFile }
|
||||||
|
.forEach { file ->
|
||||||
|
val key = file.toRelativeString(fixtureRoot)
|
||||||
|
client.putObject(bucket, key, file)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun listsContents(client: AmazonS3) {
|
||||||
|
val repository = S3Repository(client)
|
||||||
|
expectThat(repository.list("s3://repositories/m2/org/apache/test/1.0.0/")).containsExactly(
|
||||||
|
"m2/org/apache/test/1.0.0/test-1.0.0.jar",
|
||||||
|
"m2/org/apache/test/1.0.0/test-1.0.0.pom",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun findsResourceMetadata(client: AmazonS3) {
|
||||||
|
val repository = S3Repository(client)
|
||||||
|
val resource: Resource = S3Resource(repository, URI("s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"))
|
||||||
|
expectThat(resource).and {
|
||||||
|
get { exists() }.isTrue()
|
||||||
|
get { contentLength }.isNotEqualTo(-1L)
|
||||||
|
get { lastModified }.isNotEqualTo(-1L)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun downloadsResource(client: AmazonS3) {
|
||||||
|
val repository = S3Repository(client)
|
||||||
|
val resource: Resource = S3Resource(repository, URI("s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"))
|
||||||
|
val source = fixtureRoot.resolve("m2/org/apache/test/1.0.0/test-1.0.0.pom").readText()
|
||||||
|
|
||||||
|
expectThat(resource.openStream().bufferedReader().readText()).isEqualTo(source)
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExperimentalPathApi
|
||||||
|
@Test
|
||||||
|
fun locatesArtifact(client: AmazonS3) {
|
||||||
|
val resolver = IBiblioResolver().apply {
|
||||||
|
name = "s3"
|
||||||
|
root = "s3://repositories/m2/"
|
||||||
|
isM2compatible = true
|
||||||
|
settings = IvySettings().apply {
|
||||||
|
defaultInit()
|
||||||
|
setDefaultRepositoryCacheBasedir(createTempDirectory().toString())
|
||||||
|
}
|
||||||
|
repository = S3Repository(client)
|
||||||
|
}
|
||||||
|
val origin = resolver.locate(DefaultArtifact(
|
||||||
|
ArtifactRevisionId.newInstance(
|
||||||
|
ModuleRevisionId.newInstance("org.apache", "test", "1.0.0"),
|
||||||
|
"test",
|
||||||
|
"jar",
|
||||||
|
"jar"
|
||||||
|
),
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
false
|
||||||
|
))
|
||||||
|
|
||||||
|
expectThat(origin).isNotNull().and {
|
||||||
|
get { isExists }.isTrue()
|
||||||
|
get { isLocal }.isFalse()
|
||||||
|
get { location }.isEqualTo("s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
model/gradle.lockfile
Normal file
13
model/gradle.lockfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# This is a Gradle generated file for dependency locking.
|
||||||
|
# Manual edits can break the build and are not advised.
|
||||||
|
# This file is expected to be part of source control.
|
||||||
|
com.squareup.moshi:moshi:1.11.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.squareup.okio:okio:1.17.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
net.swiftzer.semver:semver:1.1.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-reflect:1.4.20=compileClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20=compileClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20=compileClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.20=compileClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.20=compileClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains:annotations:13.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
empty=
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:1.16.0
|
|
||||||
net.swiftzer.semver:semver:1.1.1
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
|
||||||
org.jetbrains:annotations:13.0
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:1.16.0
|
|
||||||
net.swiftzer.semver:semver:1.1.1
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:1.16.0
|
|
||||||
net.swiftzer.semver:semver:1.1.1
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
|
||||||
org.jetbrains:annotations:13.0
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
com.squareup.moshi:moshi:1.9.2
|
|
||||||
com.squareup.okio:okio:1.16.0
|
|
||||||
net.swiftzer.semver:semver:1.1.1
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
|
||||||
org.jetbrains:annotations:13.0
|
|
||||||
@@ -8,12 +8,14 @@ import java.lang.IllegalArgumentException
|
|||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
data class DefaultBuild(
|
data class DefaultBuild(
|
||||||
override val gradle: DefaultGradle,
|
override val gradle: DefaultGradle,
|
||||||
|
override val settingsDependencies: List<DefaultArtifact>,
|
||||||
override val pluginDependencies: List<DefaultArtifact>,
|
override val pluginDependencies: List<DefaultArtifact>,
|
||||||
override val rootProject: DefaultProject,
|
override val rootProject: DefaultProject,
|
||||||
override val includedBuilds: List<DefaultIncludedBuild>
|
override val includedBuilds: List<DefaultIncludedBuild>
|
||||||
) : Build, Serializable {
|
) : Build, Serializable {
|
||||||
constructor(model: Build) : this(
|
constructor(model: Build) : this(
|
||||||
DefaultGradle(model.gradle),
|
DefaultGradle(model.gradle),
|
||||||
|
model.settingsDependencies.map(::DefaultArtifact),
|
||||||
model.pluginDependencies.map(::DefaultArtifact),
|
model.pluginDependencies.map(::DefaultArtifact),
|
||||||
DefaultProject(model.rootProject),
|
DefaultProject(model.rootProject),
|
||||||
model.includedBuilds.map(::DefaultIncludedBuild)
|
model.includedBuilds.map(::DefaultIncludedBuild)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.nixos.gradle2nix
|
|||||||
|
|
||||||
interface Build {
|
interface Build {
|
||||||
val gradle: Gradle
|
val gradle: Gradle
|
||||||
|
val settingsDependencies: List<Artifact>
|
||||||
val pluginDependencies: List<Artifact>
|
val pluginDependencies: List<Artifact>
|
||||||
val rootProject: Project
|
val rootProject: Project
|
||||||
val includedBuilds: List<IncludedBuild>
|
val includedBuilds: List<IncludedBuild>
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
# DO NOT MODIFY: Generated by Stutter plugin.
|
# DO NOT MODIFY: Generated by Stutter plugin.
|
||||||
5.0
|
5.0
|
||||||
5.1.1
|
|
||||||
5.2.1
|
|
||||||
5.3.1
|
|
||||||
5.4.1
|
|
||||||
5.5.1
|
|
||||||
5.6.4
|
5.6.4
|
||||||
6.0.1
|
6.0.1
|
||||||
6.1
|
6.8.1
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user