15 Commits

Author SHA1 Message Date
Tad Fisher
7c02e63afa Add extraInit and buildJdk args 2020-12-01 16:44:44 -08:00
Tad Fisher
fd6a6f4693 Resolve and apply settings buildscript dependencies 2020-11-24 16:35:48 -08:00
Tad Fisher
a99b5f40e3 Ignore Gradle cache when hashing metadata artifacts 2020-11-23 14:29:14 -08:00
Tad Fisher
beb157cf18 Update build; improve caching; improve tests 2020-11-22 19:32:18 -08:00
Tad Fisher
2ad217b878 Merge pull request #24 from Mic92/fix-docs
Merge lenient configs
2020-10-23 00:16:10 -07:00
Jörg Thalheim
e05b6382ca gradle-env: fix example usage 2020-10-23 09:01:09 +02:00
Tad Fisher
b88ee98da2 Merge pull request #19 from eyJhb/buildscript-fix
fix init file not working on buildSrc
2020-08-06 14:00:49 -07:00
eyjhb
59e8130e64 fix init file not working on buildSrc 2020-08-01 13:41:51 +02:00
Tad Fisher
dd5d60e835 Fix dependency resolution for plugins in buildSrc 2020-04-27 17:42:58 -07:00
Tad Fisher
23cb225ccf Fix native-platform jar detection 2020-04-27 13:09:41 -07:00
Tad Fisher
c949f19891 Bump dependencies 2020-04-27 12:45:06 -07:00
Tad Fisher
c3c4079566 Version 1.0.0-rc2 2020-02-20 10:14:01 -08:00
Tad Fisher
baa58da5a1 Exclude local repositories from dependency resolution
Fixes https://github.com/tadfisher/gradle2nix/issues/8
2020-02-19 12:57:29 -08:00
Tad Fisher
b1b0ba14db Update README and add copyright license 2020-01-23 15:38:12 -08:00
Tad Fisher
823e43d592 Merge pull request #7 from tadfisher/custom-resolver
Custom dependency resolution
2020-01-23 10:27:57 -08:00
109 changed files with 6324 additions and 1831 deletions

20
COPYING Normal file
View File

@@ -0,0 +1,20 @@
Copyright © Tad Fisher and the gradle2nix contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,12 +1,156 @@
* gradle2nix #+STARTUP: inlineimages
Application and Gradle plugin to generate Nix build scripts for Gradle-based [[./assets/gradle2nix.png]]
projects.
Generate [[https://nixos.org/nix/][Nix]] expressions which build [[https://gradle.org/][Gradle]]-based projects.
** Why?
Nix is an OS-agnostic package manager, a language-agnostic build
system, and a bespoke programming language. One of its unique features
is that it is purely functional; a "package" is a function which
accepts inputs (source code, configuration, etc) and produces an
output (binaries, a Java JAR, documentation, really anything).
One benefit of a functional build system is [[https://reproducible-builds.org/][reproducibility]]. If you
specify your inputs precisely, and take care not to introduce
impurities—such as files retrieved over a network without tracking
their content—you will receive, byte-for-byte, the exact output as
someone else running the same function over the same inputs.
Gradle is not a functional build system. Most Gradle-based projects
will produce highly variable outputs depending on a host of impure
inputs, including:
- The JVM hosting the build
- The Gradle installation running the build
- Any usage of dynamic version constraints for dependencies
- SNAPSHOT dependencies
- Environment variables and command-line options
- Artifacts cached on the system hosting the build
=gradle2nix= helps to solve this problem by leveraging Nix to control
the most common inputs to a Gradle build. When run on a project, it
will record all dependencies for both the build environment (including
=plugins= and =buildscript= blocks) and the project, and provide a Nix
expression to run the build given these dependencies. The build itself
is then run in a sandbox, where only content-tracked network requests
are allowed to fetch dependencies, and a local Maven repository is
created on-the-fly to host the dependency artifacts somewhere Gradle
can resolve them without a network.
This tool is useful for both development and packaging. You can use
=gradle2nix= to:
- Create isolated and reproducible development environments that work
anywhere Nix itself can run;
- Reduce or eliminate flakiness and maintenance headaches from CI/CD
pipelines
- Distribute a recipe which can reliably build a Gradle project in
repositories such as the [[https://nixos.org/nixpkgs/][Nix Package Collection]].
** Installation ** Installation
A [[./default.nix][Nix expression]] (generated by =gradle2nix= itself) is provided for
convenience. The following expression will fetch and build the latest
version of this package:
#+begin_src nix
import (fetchTarball "https://github.com/tadfisher/gradle2nix/archive/master.tar.gz") {}
#+end_src
If this expression is in, say, =gradle2nix.nix=, =gradle2nix= can be
built and placed in =.//result= with the following:
#+begin_example
nix build -f gradle2nix.nix
#+end_example
You can also use the following one-liners to build or install
=gradle2nix= in your user profile:
#+begin_example
# Build and place in ./result/
nix build -f "https://github.com/tadfisher/gradle2nix/archive/master.tar.gz"
# Build and install in the user profile
nix-env -if "https://github.com/tadfisher/gradle2nix/archive/master.tar.gz"
#+end_example
=gradle2nix= is not yet packaged in =nixpkgs= itself, but work is
[[https://github.com/NixOS/nixpkgs/pull/77422][in progress]].
** Usage ** Usage
#+begin_example
Usage: gradle2nix [OPTIONS] [PROJECT-DIR]
Options:
-g, --gradle-version VERSION Use a specific Gradle version
-a, --gradle-args ARGS Extra arguments to pass to Gradle
-c, --configuration NAME Add a configuration to resolve (default:
all configurations)
-i, --include DIR Add an additional project to include
-p, --project PATH Only resolve these subproject paths, e.g.
':', or ':sub:project' (default: all
projects)
-o, --out-dir DIR Path to write generated files (default:
PROJECT-DIR)
-e, --env FILENAME Prefix for environment files (.json and
.nix) (default: gradle-env)
-b, --build-src / -nb, --no-build-src
Include buildSrc project (default: true)
-q, --quiet Disable logging
-h, --help Show this message and exit
Arguments:
PROJECT-DIR Path to the project root (default: .)
#+end_example
Simply running =gradle2nix= in the root directory of a project should
be enough for most projects. This will produce two files, by default
called =gradle-env.json= and =gradle-env.nix=, which contain the
pinned dependencies for the project and a standard build expression
which can be imported or called by other Nix expressions. An example
of such an expression can be found in this project's [[./default.nix][default.nix]].
*** Specifying the Gradle version
By default, if the project has configured the Gradle wrapper, that
version will be detected and pinned; otherwise, the version of Gradle
installed on your system will be pinned. You can override this with
the =--gradle-version= argument, which also avoids the need to have
Gradle installed.
#+begin_example
gradle2nix -g 6.1
#+end_example
*** Multi-project builds
If you want to resolve only a subset of projects in a [[https://docs.gradle.org/current/userguide/intro_multi_project_builds.html][multi-project
build]], add the =--project= option for each project. For example, in a
project where you only want to build the subprojects =:app= and
=:widget=:
#+begin_example
gradle2nix -p :app -p :widget
#+end_example
Any [[https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:project_dependencies][project dependencies]] will be also be included when pinning
dependency artifacts.
** Contributing
Bug reports and feature requests are encouraged.
[[https://github.com/tadfisher/gradle2nix/issues/new][Create an issue]]
Code contributions are also encouraged. Please review the test cases
in the [[./fixtures][fixtures]] directory and create a new one to reproduce any fixes
or test new features. See the [[./plugin/src/compatTest/kotlin/org/nixos/gradle2nix][existing compatibility tests]] for
examples of testing with these fixtures.
** License ** License
=gradle2nix= is licensed under the [[./COPYING][MIT License]].

View File

@@ -4,6 +4,7 @@ plugins {
kotlin("jvm") kotlin("jvm")
kotlin("kapt") kotlin("kapt")
application application
idea
} }
dependencies { dependencies {
@@ -18,10 +19,15 @@ 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
@@ -30,11 +36,19 @@ application {
.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 +59,28 @@ 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"
} }
} }
idea {
module {
}
}
} }

33
app/gradle.lockfile Normal file
View File

@@ -0,0 +1,33 @@
# 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:2.9.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.github.classgraph:classgraph:4.8.37=testRuntimeClasspath
io.strikt:strikt-core:0.28.0=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-milestone-3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-reflect:1.4.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:1.4.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3=testRuntimeClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.3.9=testRuntimeClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9=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.14=testCompileClasspath,testRuntimeClasspath
org.spekframework.spek2:spek-runner-junit5:2.0.14=testRuntimeClasspath
org.spekframework.spek2:spek-runtime-jvm:2.0.14=testRuntimeClasspath
empty=

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;
@@ -21,23 +21,33 @@
{ stdenv, buildEnv, fetchurl, gradleGen, writeText, writeTextDir }: { stdenv, buildEnv, 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
, ... } @ args: , ... } @ args:
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 +186,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 +224,37 @@ let
} }
} }
gradle.settingsEvaluated { ${optionalString (hasDependencies.settings && (versionAtLeast gradle.version "6.0")) ''
offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}") gradle.beforeSettings {
} offlineRepo(it.buildscript.repositories, "settings", "${repos.settings}")
}
''}
gradle.projectsLoaded { ${optionalString (hasDependencies.plugin) ''
allprojects { gradle.settingsEvaluated {
buildscript { offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}")
offlineRepo(repositories, "buildscript", "${repos.buildscript}") }
} ''}
offlineRepo(repositories, "project", "${repos.project}")
} ${optionalString (hasDependencies.buildscript) ''
} gradle.projectsLoaded {
allprojects {
buildscript {
offlineRepo(repositories, "buildscript", "${repos.buildscript}")
}
}
}
''}
${optionalString (hasDependencies.project) ''
gradle.projectsLoaded {
allprojects {
offlineRepo(repositories, "project", "${repos.project}")
}
}
''}
${extraInit}
''; '';
mkGradle = gradleSpec: mkGradle = gradleSpec:
@@ -227,12 +266,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 +284,24 @@ 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"} \
${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 +312,16 @@ in stdenv.mkDerivation (args // {
runHook preBuild runHook preBuild
( (
set -x set -eux
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

View File

@@ -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)

View File

@@ -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)
} }

View File

@@ -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,

View 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")
}
}
})

View File

@@ -0,0 +1,57 @@
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
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!!
}
}
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 = createTempDir("gradle2nix").toPath()
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()
}
)
}

BIN
assets/gradle2nix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

680
assets/gradle2nix.svg Normal file
View File

@@ -0,0 +1,680 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1280"
height="640"
viewBox="0 0 338.66666 169.33334"
version="1.1"
id="svg8"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="gradle2nix.svg">
<defs
id="defs2">
<linearGradient
gradientTransform="matrix(0.52333152,0,0,0.52333152,25.176839,183.12552)"
id="linear-gradient"
x1="1.5"
y1="29.09"
x2="88.3"
y2="38.21"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#06a0ce"
id="stop4734" />
<stop
offset="1"
stop-color="#51cbbf"
id="stop4736" />
</linearGradient>
<style
id="style4930">.Graphic-Style-2{fill:url(#linear-gradient);}</style>
<linearGradient
gradientUnits="userSpaceOnUse"
y2="38.21"
x2="88.3"
y1="29.09"
x1="1.5"
id="linear-gradient-5"
gradientTransform="matrix(0.52333152,0,0,0.52333152,25.176839,183.12552)">
<stop
id="stop4932"
stop-color="#06a0ce"
offset="0" />
<stop
id="stop4934"
stop-color="#51cbbf"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient5562"
inkscape:collect="always">
<stop
id="stop5564"
offset="0"
style="stop-color:#699ad7;stop-opacity:1" />
<stop
style="stop-color:#7eb1dd;stop-opacity:1"
offset="0.24345198"
id="stop5566" />
<stop
id="stop5568"
offset="1"
style="stop-color:#7ebae4;stop-opacity:1" />
</linearGradient>
<linearGradient
id="linearGradient5053"
inkscape:collect="always">
<stop
id="stop5055"
offset="0"
style="stop-color:#415e9a;stop-opacity:1" />
<stop
style="stop-color:#4a6baf;stop-opacity:1"
offset="0.23168644"
id="stop5057" />
<stop
id="stop5059"
offset="1"
style="stop-color:#5277c3;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5960">
<stop
style="stop-color:#637ddf;stop-opacity:1"
offset="0"
id="stop5962" />
<stop
id="stop5964"
offset="0.23168644"
style="stop-color:#649afa;stop-opacity:1" />
<stop
style="stop-color:#719efa;stop-opacity:1"
offset="1"
id="stop5966" />
</linearGradient>
<linearGradient
id="linearGradient5867"
inkscape:collect="always">
<stop
id="stop5869"
offset="0"
style="stop-color:#7363df;stop-opacity:1" />
<stop
style="stop-color:#6478fa;stop-opacity:1"
offset="0.23168644"
id="stop5871" />
<stop
id="stop5873"
offset="1"
style="stop-color:#719efa;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5960"
id="linearGradient5855"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(983.36076,601.38885)"
x1="213.95642"
y1="338.62445"
x2="282.26105"
y2="515.97058" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5867"
id="linearGradient5855-8"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-197.75174,-337.1451)"
x1="213.95642"
y1="338.62445"
x2="282.26105"
y2="515.97058" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5960"
id="linearGradient4544"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(983.36076,601.38885)"
x1="-775.20807"
y1="102.74675"
x2="-702.75317"
y2="247.58188" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4501">
<circle
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#adadad;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="circle4503"
cx="335.13995"
cy="686.09473"
r="241.06563" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath5410">
<circle
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="circle5412"
cx="335.98114"
cy="340.98975"
r="241.13741" />
</clipPath>
<linearGradient
y2="937.71399"
x2="-496.29703"
y1="782.33563"
x1="-584.19934"
gradientTransform="translate(864.55062,-2197.497)"
gradientUnits="userSpaceOnUse"
id="linearGradient5137"
xlink:href="#linearGradient5053"
inkscape:collect="always" />
<linearGradient
y2="506.18814"
x2="290.08701"
y1="351.41116"
x1="200.59668"
gradientTransform="translate(70.505061,-1761.3076)"
gradientUnits="userSpaceOnUse"
id="linearGradient5162"
xlink:href="#linearGradient5562"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient3917"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.650339,-1055.1511)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient3919"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.69589,-1491.3405)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
<linearGradient
inkscape:collect="always"
xlink:href="#linear-gradient-5"
id="linearGradient4732"
x1="418.76779"
y1="264.43814"
x2="652.08905"
y2="296.6008"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5867"
id="linearGradient4745"
x1="421.11343"
y1="273.91626"
x2="524.12122"
y2="273.91626"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linear-gradient-5"
id="linearGradient4763"
gradientUnits="userSpaceOnUse"
x1="418.76779"
y1="264.43814"
x2="652.08905"
y2="296.6008" />
<linearGradient
inkscape:collect="always"
xlink:href="#linear-gradient-5"
id="linearGradient4765"
gradientUnits="userSpaceOnUse"
x1="418.76779"
y1="264.43814"
x2="652.08905"
y2="296.6008" />
<linearGradient
inkscape:collect="always"
xlink:href="#linear-gradient-5"
id="linearGradient4767"
gradientUnits="userSpaceOnUse"
x1="418.76779"
y1="264.43814"
x2="652.08905"
y2="296.6008" />
<linearGradient
inkscape:collect="always"
xlink:href="#linear-gradient-5"
id="linearGradient4769"
gradientUnits="userSpaceOnUse"
x1="418.76779"
y1="264.43814"
x2="652.08905"
y2="296.6008" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5867"
id="linearGradient4771"
gradientUnits="userSpaceOnUse"
x1="421.11343"
y1="273.91626"
x2="524.12122"
y2="273.91626" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5867"
id="linearGradient4773"
gradientUnits="userSpaceOnUse"
x1="421.11343"
y1="273.91626"
x2="524.12122"
y2="273.91626" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5867"
id="linearGradient4775"
gradientUnits="userSpaceOnUse"
x1="421.11343"
y1="273.91626"
x2="524.12122"
y2="273.91626" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.38515625"
inkscape:cx="791.08312"
inkscape:cy="364.77075"
inkscape:document-units="px"
inkscape:current-layer="g4759"
showgrid="false"
units="px"
showguides="false"
inkscape:guide-bbox="true"
inkscape:window-width="1660"
inkscape:window-height="1011"
inkscape:window-x="260"
inkscape:window-y="30"
inkscape:window-maximized="0">
<sodipodi:guide
position="0,148.16667"
orientation="0,1"
id="guide4518"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,0,255)" />
<sodipodi:guide
position="0,21.166667"
orientation="0,1"
id="guide4793"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,0,255)" />
<sodipodi:guide
position="21.166667,0"
orientation="1,0"
id="guide4795"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,0,255)" />
<sodipodi:guide
position="317.5,0"
orientation="1,0"
id="guide4797"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,0,255)" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-127.66665)">
<g
id="g3833"
transform="matrix(1.087741,0,0,1.0877425,-6.2376695,-19.285721)">
<path
style="fill:url(#linear-gradient-5);stroke-width:0.52333152"
inkscape:connector-curvature="0"
class="Graphic-Style-2"
d="m 69.717638,185.31305 a 7.4679407,7.4679407 0 0 0 -10.37771,-0.17802 0.72219753,0.72219753 0 0 0 0,1.04667 l 0.900124,0.92105 a 0.71173086,0.71173086 0 0 0 0.931533,0.0627 4.2808518,4.2808518 0 0 1 5.610133,6.45792 c -5.929373,5.92412 -13.842146,-10.68643 -31.802883,-2.12473 a 2.4334915,2.4334915 0 0 0 -1.04665,3.4226 l 3.082411,5.32227 a 2.4282583,2.4282583 0 0 0 3.296998,0.90536 l 0.07318,-0.0419 -0.05756,0.0419 1.350185,-0.75359 a 31.551656,31.551656 0 0 0 4.301795,-3.20804 0.75359739,0.75359739 0 0 1 0.978628,-0.0314 v 0 a 0.70126424,0.70126424 0 0 1 0.03145,1.04667 32.242454,32.242454 0 0 1 -4.542531,3.41735 h -0.04707 l -1.365891,0.76407 a 3.8412533,3.8412533 0 0 1 -1.889235,0.49194 3.8988198,3.8988198 0 0 1 -3.385946,-1.94158 l -2.914958,-5.0292 c -5.573487,3.96685 -8.996077,11.58655 -7.143483,21.23679 a 0.71173086,0.71173086 0 0 0 0.696033,0.58089 h 3.286533 a 0.71173086,0.71173086 0 0 0 0.72743,-0.64893 4.8617496,4.8617496 0 0 1 9.639776,0 0.70649755,0.70649755 0 0 0 0.70126,0.62278 h 3.213252 a 0.71173086,0.71173086 0 0 0 0.701262,-0.62278 4.8617496,4.8617496 0 0 1 9.639776,0 0.71173086,0.71173086 0 0 0 0.70126,0.62278 h 3.192327 a 0.71173086,0.71173086 0 0 0 0.711723,-0.70128 c 0.07318,-4.50064 1.287386,-9.67117 4.746628,-12.26165 11.98433,-8.96468 8.83387,-16.64718 6.06022,-19.42083 z m -12.21985,13.53858 -2.286941,-1.1461 v 0 a 1.4339283,1.4339283 0 1 1 2.286941,1.15134 z"
id="path4941" />
<g
transform="matrix(0.08170627,0,0,0.08170627,58.715285,207.19198)"
id="g5193">
<g
id="layer7"
inkscape:label="bg"
style="display:none"
transform="translate(-23.75651,-24.84972)">
<rect
transform="translate(-132.5822,958.04022)"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5389"
width="1543.4283"
height="483.7439"
x="132.5822"
y="-957.77832" />
</g>
<g
id="layer6"
inkscape:label="logo-guide"
style="display:none"
transform="translate(-156.33871,933.1905)">
<rect
y="-958.02759"
x="132.65129"
height="484.30399"
width="550.41602"
id="rect5379"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5c201e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename="/home/tim/dev/nix/homepage/logo/nix-wiki.png"
inkscape:export-xdpi="22.07"
inkscape:export-ydpi="22.07" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c24a46;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5372"
width="501.94415"
height="434.30405"
x="156.12303"
y="-933.02759"
inkscape:export-filename="/home/tim/dev/nix/homepage/logo/nixos-logo-only-hires-print.png"
inkscape:export-xdpi="212.2"
inkscape:export-ydpi="212.2" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#d98d8a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5381"
width="24.939611"
height="24.939611"
x="658.02826"
y="-958.04022" />
</g>
<g
inkscape:label="print-logo"
id="layer1-6"
style="display:inline"
transform="translate(-156.33871,933.1905)">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
id="path4861"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 353.50926,-797.4433 -122.21756,211.6631 -28.53477,-48.37 32.93839,-56.6875 -65.41521,-0.1719 -13.9414,-24.1698 14.23637,-24.721 93.11177,0.2939 33.46371,-57.6903 z"
id="use4863"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 362.88537,-628.243 244.41439,0.012 -27.62229,48.8968 -65.56199,-0.1817 32.55876,56.7371 -13.96098,24.1585 -28.52722,0.032 -46.3013,-80.7841 -66.69317,-0.1353 z"
id="use4865"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 505.14318,-720.9886 -122.19683,-211.6751 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4902 33.22946,57.8256 z"
id="use4867"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="path4873"
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="use4875"
d="m 451.3364,-803.53264 -244.4144,-0.012 27.62229,-48.89685 65.56199,0.18175 -32.55875,-56.73717 13.96097,-24.15851 28.52722,-0.0315 46.3013,80.78414 66.69317,0.13524 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="use4877"
d="m 460.87178,-633.8425 122.21757,-211.66304 28.53477,48.37003 -32.93839,56.68751 65.4152,0.1718 13.9414,24.1698 -14.23636,24.7211 -93.11177,-0.294 -33.46371,57.6904 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<g
id="layer2"
inkscape:label="guides"
style="display:none"
transform="translate(72.039038,-1799.4476)">
<path
d="M 460.60629,594.72881 209.74183,594.7288 84.309616,377.4738 209.74185,160.21882 l 250.86446,1e-5 125.43222,217.255 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="true"
sodipodi:arg2="1.5707963"
sodipodi:arg1="1.0471976"
sodipodi:r2="217.25499"
sodipodi:r1="250.86446"
sodipodi:cy="377.47382"
sodipodi:cx="335.17407"
sodipodi:sides="6"
id="path6032"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.23600003;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
sodipodi:type="star" />
<path
transform="translate(0,-308.26772)"
sodipodi:type="star"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path5875"
sodipodi:sides="6"
sodipodi:cx="335.17407"
sodipodi:cy="685.74158"
sodipodi:r1="100.83495"
sodipodi:r2="87.32563"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 385.59154,773.06721 -100.83495,0 -50.41747,-87.32564 50.41748,-87.32563 100.83495,10e-6 50.41748,87.32563 z" />
<path
transform="translate(0,-308.26772)"
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path5851"
d="m 1216.5591,938.53395 123.0545,228.14035 -42.6807,-1.2616 -43.4823,-79.7725 -39.6506,80.3267 -32.6875,-19.7984 53.4737,-100.2848 -37.1157,-73.88955 z"
style="fill:url(#linearGradient5855);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.41499999;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c53a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5884"
width="48.834862"
height="226.22897"
x="-34.74221"
y="446.17056"
transform="rotate(-30)" />
<path
transform="translate(0,-308.26772)"
sodipodi:type="star"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.50899999;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path3428"
sodipodi:sides="6"
sodipodi:cx="223.93674"
sodipodi:cy="878.63831"
sodipodi:r1="28.048939"
sodipodi:r2="24.291094"
sodipodi:arg1="0"
sodipodi:arg2="0.52359878"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 251.98568,878.63831 -14.02447,24.29109 h -28.04894 l -14.02447,-24.29109 14.02447,-24.2911 h 28.04894 z" />
<use
x="0"
y="0"
xlink:href="#rect5884"
id="use4252"
transform="rotate(60,268.29786,489.4515)"
width="100%"
height="100%" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.6507937;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4254"
width="5.3947482"
height="115.12564"
x="545.71014"
y="467.07007"
transform="rotate(30,575.23539,-154.13386)" />
</g>
</g>
<g
id="layer3"
inkscape:label="gradient-logo"
style="display:inline;opacity:1"
transform="translate(-156.33871,933.1905)">
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="path3336-6"
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8257 z"
style="opacity:1;fill:url(#linearGradient3917);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<use
height="100%"
width="100%"
transform="rotate(60,407.11155,-715.78724)"
id="use3439-6"
inkscape:transform-center-y="151.59082"
inkscape:transform-center-x="124.43045"
xlink:href="#path3336-6"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="rotate(-60,407.31177,-715.70016)"
id="use3445-0"
inkscape:transform-center-y="75.573958"
inkscape:transform-center-x="-168.20651"
xlink:href="#path3336-6"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="rotate(180,407.41868,-715.7565)"
id="use3449-5"
inkscape:transform-center-y="-139.94592"
inkscape:transform-center-x="59.669705"
xlink:href="#path3336-6"
y="0"
x="0" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient3919);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8256 z"
id="path4260-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<use
height="100%"
width="100%"
transform="rotate(120,407.33916,-716.08356)"
id="use4354-5"
xlink:href="#path4260-0"
y="0"
x="0"
style="display:inline" />
<use
height="100%"
width="100%"
transform="rotate(-120,407.28823,-715.86995)"
id="use4362-2"
xlink:href="#path4260-0"
y="0"
x="0"
style="display:inline" />
</g>
</g>
</g>
<flowRoot
xml:space="preserve"
id="flowRoot6066"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
id="flowRegion6068"><rect
id="rect6070"
width="650"
height="201.42857"
x="428.57144"
y="231.42857" /></flowRegion><flowPara
id="flowPara6072" /></flowRoot> <g
id="g3895"
transform="matrix(1.087741,0,0,1.0877425,-1.5979005,-62.174062)">
<g
id="g4759"
transform="translate(0,-0.48648156)">
<flowRoot
transform="matrix(0.45162205,0,0,0.45162205,-75.796378,125.9913)"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;line-height:1.25;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:url(#linearGradient4769);fill-opacity:1;stroke:none"
id="flowRoot3849"
xml:space="preserve"><flowRegion
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient4765);fill-opacity:1"
id="flowRegion3845"><rect
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient4763);fill-opacity:1"
y="218.57143"
x="412.85715"
height="200"
width="787.14282"
id="rect3843" /></flowRegion><flowPara
style="fill:url(#linearGradient4767);fill-opacity:1"
id="flowPara3847">gradle</flowPara></flowRoot> <flowRoot
transform="matrix(0.45162205,0,0,0.45162205,34.199761,125.86986)"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;line-height:1.25;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff2a2a;fill-opacity:0.68707485;stroke:none"
id="flowRoot3865"
xml:space="preserve"><flowRegion
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ff2a2a;fill-opacity:0.68707485"
id="flowRegion3861"><rect
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ff2a2a;fill-opacity:0.68707485"
y="218.57143"
x="412.85715"
height="200"
width="787.14282"
id="rect3859" /></flowRegion><flowPara
id="flowPara3863">2</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot3873"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;line-height:1.25;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:url(#linearGradient4745);fill-opacity:1;stroke:none"
transform="matrix(0.45162205,0,0,0.45162205,56.653631,125.86986)"><flowRegion
id="flowRegion3869"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient4773);fill-opacity:1"><rect
id="rect3867"
width="787.14282"
height="200"
x="412.85715"
y="218.57143"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:96px;font-family:Vegur;-inkscape-font-specification:'Vegur, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient4771);fill-opacity:1" /></flowRegion><flowPara
style="fill:url(#linearGradient4775);fill-opacity:1"
id="flowPara3871">nix</flowPara></flowRoot> </g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -36,12 +36,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 +49,7 @@ allprojects {
tasks { tasks {
wrapper { wrapper {
gradleVersion = "6.1" gradleVersion = "6.8-milestone-3"
distributionType = Wrapper.DistributionType.ALL distributionType = Wrapper.DistributionType.ALL
} }
} }

View File

@@ -3,17 +3,36 @@
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 = ./.; 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 = ./.;
};
};
gradleFlags = [ "installDist" ]; gradleFlags = [ "installDist" ];
installPhase = '' installPhase = ''
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

View 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()
}

View File

@@ -0,0 +1,4 @@
plugins {
`java-library`
id("com.example.custom-spotless")
}

View File

@@ -0,0 +1,12 @@
plugins {
`kotlin-dsl`
}
repositories {
jcenter()
gradlePluginPortal()
}
dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:3.28.1")
}

View File

@@ -0,0 +1,11 @@
package com.example
plugins {
com.diffplug.gradle.spotless
}
spotless {
kotlin {
ktlint()
}
}

View 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")
}

View 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"
}

View File

@@ -0,0 +1,11 @@
plugins {
java
}
repositories {
maven { url = uri("http://localhost:9999") }
}
dependencies {
"implementation"("org.apache:test-SNAPSHOT1:2.0.2-SNAPSHOT")
}

View File

@@ -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"
} }

View File

@@ -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")
} }

View File

@@ -0,0 +1 @@
version = '1.1.0'

View File

@@ -0,0 +1,9 @@
with (import <nixpkgs> {});
let
buildGradle = callPackage ./gradle-env.nix {};
in
buildGradle {
envSpec = ./gradle-env.json;
src = ./.;
gradleFlags = [ "tasks" ];
}

View 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": []
}
}
}

View File

@@ -0,0 +1,318 @@
# This file is generated by gradle2nix.
#
# Example usage (e.g. in default.nix):
#
# with (import <nixpkgs> {});
# let
# buildGradle = callPackage ./gradle-env.nix {};
# in
# buildGradle {
# envSpec = ./gradle-env.json;
#
# src = ./.;
#
# gradleFlags = [ "installDist" ];
#
# installPhase = ''
# mkdir -p $out
# cp -r app/build/install/myproject $out
# '';
# }
{ stdenv, buildEnv, fetchurl, gradleGen, writeText, writeTextDir }:
{ envSpec
, pname ? null
, version ? null
, enableParallelBuilding ? true
, gradleFlags ? [ "build" ]
, gradlePackage ? null
, enableDebug ? false
, ... } @ args:
let
inherit (builtins)
attrValues concatStringsSep filter fromJSON match replaceStrings sort;
inherit (stdenv.lib)
assertMsg concatMapStringsSep groupBy' hasSuffix last mapAttrs
mapAttrsToList optionalString readFile removeSuffix unique versionAtLeast
versionOlder;
mkDep = depSpec: stdenv.mkDerivation {
inherit (depSpec) name;
src = fetchurl {
inherit (depSpec) urls sha256;
};
phases = "installPhase";
installPhase = ''
mkdir -p $out/${depSpec.path}
ln -s $src $out/${depSpec.path}/${depSpec.name}
'';
};
mkModuleMetadata = deps:
let
ids = filter
(id: id.type == "pom")
(map (dep: dep.id) deps);
modules = groupBy'
(meta: id:
let
isNewer = versionOlder meta.latest id.version;
isNewerRelease =
!(hasSuffix "-SNAPSHOT" id.version) &&
versionOlder meta.release id.version;
in {
groupId = id.group;
artifactId = id.name;
latest = if isNewer then id.version else meta.latest;
release = if isNewerRelease then id.version else meta.release;
versions = meta.versions ++ [id.version];
}
)
{
latest = "";
release = "";
versions = [];
}
(id: "${replaceStrings ["."] ["/"] id.group}/${id.name}/maven-metadata.xml")
ids;
in
attrValues (mapAttrs (path: meta:
let
versions' = sort versionOlder (unique meta.versions);
in
with meta; writeTextDir path ''
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1">
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<versioning>
${optionalString (latest != "") "<latest>${latest}</latest>"}
${optionalString (release != "") "<release>${release}</release>"}
<versions>
${concatMapStringsSep "\n " (v: "<version>${v}</version>") versions'}
</versions>
</versioning>
</metadata>
''
) modules);
mkSnapshotMetadata = deps:
let
snapshotDeps = filter (dep: dep ? build && dep ? timestamp) deps;
modules = groupBy'
(meta: dep:
let
id = dep.id;
isNewer = dep.build > meta.buildNumber;
# Timestamp values can be bogus, e.g. jitpack.io
updated = if (match "[0-9]{8}\.[0-9]{6}" dep.timestamp) != null
then replaceStrings ["."] [""] dep.timestamp
else "";
in {
groupId = id.group;
artifactId = id.name;
version = id.version;
timestamp = if isNewer then dep.timestamp else meta.timestamp;
buildNumber = if isNewer then dep.build else meta.buildNumber;
lastUpdated = if isNewer then updated else meta.lastUpdated;
versions = meta.versions or [] ++ [{
classifier = id.classifier or "";
extension = id.extension;
value = "${removeSuffix "-SNAPSHOT" id.version}-${dep.timestamp}-${toString dep.build}";
updated = updated;
}];
}
)
{
timestamp = "";
buildNumber = -1;
lastUpdated = "";
}
(dep: "${replaceStrings ["."] ["/"] dep.id.group}/${dep.id.name}/${dep.id.version}/maven-metadata.xml")
snapshotDeps;
mkSnapshotVersion = version: ''
<snapshotVersion>
${optionalString (version.classifier != "") "<classifier>${version.classifier}</classifier>"}
<extension>${version.extension}</extension>
<value>${version.value}</value>
${optionalString (version.updated != "") "<updated>${version.updated}</updated>"}
</snapshotVersion>
'';
in
attrValues (mapAttrs (path: meta:
with meta; writeTextDir path ''
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1">
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<versioning>
<snapshot>
${optionalString (timestamp != "") "<timestamp>${timestamp}</timestamp>"}
${optionalString (buildNumber != -1) "<buildNumber>${toString buildNumber}</buildNumber>"}
</snapshot>
${optionalString (lastUpdated != "") "<lastUpdated>${lastUpdated}</lastUpdated>"}
<snapshotVersions>
${concatMapStringsSep "\n " mkSnapshotVersion versions}
</snapshotVersions>
</versioning>
</metadata>
''
) modules);
mkRepo = project: type: deps: buildEnv {
name = "${project}-gradle-${type}-env";
paths = map mkDep deps ++ mkModuleMetadata deps ++ mkSnapshotMetadata deps;
};
mkInitScript = projectSpec: gradle:
let
repos = mapAttrs (mkRepo projectSpec.name) projectSpec.dependencies;
hasDependencies = mapAttrs (type: deps: deps != []) projectSpec.dependencies;
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" ''
static def offlineRepo(RepositoryHandler repositories, String env, String path) {
repositories.clear()
repositories.maven {
name "Nix''${env.capitalize()}MavenOffline"
url path
metadataSources {
it.gradleMetadata()
it.mavenPom()
it.artifact()
}
}
repositories.ivy {
name "Nix''${env.capitalize()}IvyOffline"
url path
layout "maven"
metadataSources {
it.gradleMetadata()
it.ivyDescriptor()
it.artifact()
}
}
}
${optionalString (hasDependencies.settings && (versionAtLeast gradle.version "6.0")) ''
gradle.beforeSettings {
offlineRepo(it.buildscript.repositories, "settings", "${repos.settings}")
}
''}
${optionalString (hasDependencies.plugin) ''
gradle.settingsEvaluated {
offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}")
}
''}
${optionalString (hasDependencies.buildscript) ''
gradle.projectsLoaded {
allprojects {
buildscript {
offlineRepo(repositories, "buildscript", "${repos.buildscript}")
}
}
}
''}
${optionalString (hasDependencies.project) ''
gradle.projectsLoaded {
allprojects {
offlineRepo(repositories, "project", "${repos.project}")
}
}
''}
'';
mkGradle = gradleSpec:
gradleGen.gradleGen {
inherit (gradleSpec) nativeVersion;
name = "gradle-${gradleSpec.version}-${gradleSpec.type}";
src = fetchurl {
inherit (gradleSpec) url sha256;
};
} // {
inherit (gradleSpec) version;
};
mkProjectEnv = projectSpec: rec {
inherit (projectSpec) name path version;
gradle = args.gradlePackage or mkGradle projectSpec.gradle;
initScript = mkInitScript projectSpec gradle;
};
gradleEnv = mapAttrs
(_: p: mkProjectEnv p)
(fromJSON (readFile envSpec));
projectEnv = gradleEnv."";
pname = args.pname or projectEnv.name;
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 // {
inherit pname version;
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ projectEnv.gradle ];
buildPhase = args.buildPhase or ''
runHook preBuild
(
set -x
# use the init script here
TMPHOME=$(mktemp -d)
mkdir -p $TMPHOME/init.d
cp ${projectEnv.initScript} $TMPHOME/init.d
export "GRADLE_USER_HOME=$TMPHOME"
${buildIncludedProjects}
${buildRootProject}
)
runHook postBuild
'';
dontStrip = true;
})

View File

@@ -0,0 +1 @@
startingVersion = '1.0.0'

View File

@@ -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'

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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=

View File

@@ -0,0 +1,174 @@
cp <?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>

View File

@@ -0,0 +1 @@
fb57aac12f2370e7115ab8af5265322397cae49e

View File

@@ -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=

View File

@@ -0,0 +1 @@
f58ddf32310729011f6c2171fbe1a085b4336b2f

View File

@@ -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>

View File

@@ -0,0 +1 @@
e68ba4ca00f195e4aa6a5ccd78feef2d24c578ca

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<metadata>
<groupId>org.apache</groupId>
<artifactId>test-SNAPSHOT2</artifactId>
<version>2.0.2-SNAPSHOT</version>
<versioning>
<versions>
<version>2.0.2-SNAPSHOT</version>
</versions>
<lastUpdated>20070310181754</lastUpdated>
</versioning>
</metadata>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache</groupId>
<artifactId>test</artifactId>
<version>1.0.0</version>
<name>test</name>
<description>
test
</description>
</project>

View File

@@ -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>

View File

@@ -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=

View File

@@ -0,0 +1 @@
769c0b82cb2421c8256300e907298a9410a2a3d3

View File

@@ -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>

View File

@@ -0,0 +1 @@
5baec26b6f9e5b17fdd200fc20af85eead4287c4

View File

@@ -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=

View File

@@ -0,0 +1,10 @@
buildscript {
repositories {
maven {
url 'http://localhost:9999/'
}
}
dependencies {
classpath 'org.apache:test:1.0.0'
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -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;
@@ -21,23 +21,33 @@
{ stdenv, buildEnv, fetchurl, gradleGen, writeText, writeTextDir }: { stdenv, buildEnv, 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
, ... } @ args: , ... } @ args:
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 +186,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 +224,37 @@ let
} }
} }
gradle.settingsEvaluated { ${optionalString (hasDependencies.settings && (versionAtLeast gradle.version "6.0")) ''
offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}") gradle.beforeSettings {
} offlineRepo(it.buildscript.repositories, "settings", "${repos.settings}")
}
''}
gradle.projectsLoaded { ${optionalString (hasDependencies.plugin) ''
allprojects { gradle.settingsEvaluated {
buildscript { offlineRepo(it.pluginManagement.repositories, "plugin", "${repos.plugin}")
offlineRepo(repositories, "buildscript", "${repos.buildscript}") }
} ''}
offlineRepo(repositories, "project", "${repos.project}")
} ${optionalString (hasDependencies.buildscript) ''
} gradle.projectsLoaded {
allprojects {
buildscript {
offlineRepo(repositories, "buildscript", "${repos.buildscript}")
}
}
}
''}
${optionalString (hasDependencies.project) ''
gradle.projectsLoaded {
allprojects {
offlineRepo(repositories, "project", "${repos.project}")
}
}
''}
${extraInit}
''; '';
mkGradle = gradleSpec: mkGradle = gradleSpec:
@@ -227,12 +266,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 +284,24 @@ 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"} \
${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 +312,16 @@ in stdenv.mkDerivation (args // {
runHook preBuild runHook preBuild
( (
set -x set -eux
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

View File

@@ -1,3 +1,3 @@
org.gradle.jvmargs='-Dfile.encoding=UTF-8' org.gradle.jvmargs='-Dfile.encoding=UTF-8'
VERSION=1.0.0-rc1 VERSION=1.0.0-rc2

Binary file not shown.

View File

@@ -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-milestone-3-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

2
gradlew vendored
View File

@@ -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
View File

@@ -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

13
model/gradle.lockfile Normal file
View 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.10=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:1.4.10=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains:annotations:13.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
empty=

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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>

View File

@@ -1,10 +0,0 @@
# DO NOT MODIFY: Generated by Stutter plugin.
5.0
5.1.1
5.2.1
5.3.1
5.4.1
5.5.1
5.6.4
6.0.1
6.1

View File

@@ -1,17 +1,8 @@
# DO NOT MODIFY: Generated by Stutter plugin. # DO NOT MODIFY: Generated by Stutter plugin.
4.4.1 4.4.1
4.5.1
4.6
4.7
4.8.1
4.9
4.10.3 4.10.3
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.7.1
6.8-milestone-3

View File

@@ -47,6 +47,7 @@ dependencies {
compatTestImplementation(project(":model")) compatTestImplementation(project(":model"))
compatTestImplementation("io.strikt:strikt-core:latest.release") compatTestImplementation("io.strikt:strikt-core:latest.release")
compatTestImplementation("com.squareup.okio:okio:latest.release") compatTestImplementation("com.squareup.okio:okio:latest.release")
compatTestImplementation("io.javalin:javalin:latest.release")
} }
gradlePlugin { gradlePlugin {
@@ -65,6 +66,7 @@ kotlinDslPluginOptions {
} }
stutter { stutter {
isSparse = true
java(8) { java(8) {
compatibleRange("4.4") compatibleRange("4.4")
} }
@@ -79,6 +81,14 @@ tasks {
} }
withType<Test> { withType<Test> {
useJUnitPlatform() useJUnitPlatform {
includeEngines("junit-jupiter")
}
afterTest(KotlinClosure2<TestDescriptor, TestResult, Any>({ descriptor, result ->
// work around a bug in Gradle versions before 6.1, see https://github.com/junit-team/junit5/issues/2041
val test = descriptor as org.gradle.api.internal.tasks.testing.TestDescriptorInternal
println("[${test.classDisplayName}] > [${test.displayName}]: ${result.resultType}")
}))
} }
} }

View File

@@ -0,0 +1,36 @@
# 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.gundy:semver4j:0.16.4=classpath
com.google.code.gson:gson:2.8.5=classpath
de.undercouch:gradle-download-task:4.0.2=classpath
org.antlr:antlr4-runtime:4.5.2-1=classpath
org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:1.4.2=classpath
org.gradle.kotlin:gradle-kotlin-dsl-plugins:1.4.2=classpath
org.jetbrains.intellij.deps:trove4j:1.0.20181211=classpath
org.jetbrains.kotlin:kotlin-android-extensions:1.4.10=classpath
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.4.10=classpath
org.jetbrains.kotlin:kotlin-build-common:1.4.10=classpath
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.10=classpath
org.jetbrains.kotlin:kotlin-compiler-runner:1.4.10=classpath
org.jetbrains.kotlin:kotlin-daemon-client:1.4.10=classpath
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.4.10=classpath
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.4.10=classpath
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.4.10=classpath
org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10=classpath
org.jetbrains.kotlin:kotlin-reflect:1.4.10=classpath
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.4.10=classpath
org.jetbrains.kotlin:kotlin-script-runtime:1.4.10=classpath
org.jetbrains.kotlin:kotlin-scripting-common:1.4.10=classpath
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.4.10=classpath
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.4.10=classpath
org.jetbrains.kotlin:kotlin-scripting-jvm:1.4.10=classpath
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.4.10=classpath
org.jetbrains.kotlin:kotlin-util-io:1.4.10=classpath
org.jetbrains.kotlin:kotlin-util-klib:1.4.10=classpath
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7=classpath
org.jetbrains:annotations:13.0=classpath
empty=

69
plugin/gradle.lockfile Normal file
View File

@@ -0,0 +1,69 @@
# 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=compatTestRuntimeClasspath
com.squareup.moshi:moshi:1.11.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
com.squareup.okio:okio-metadata:2.9.0=compatTestImplementationDependenciesMetadata
com.squareup.okio:okio:1.17.5=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
com.squareup.okio:okio:2.9.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
dev.minutest:minutest:1.11.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
io.github.classgraph:classgraph:4.8.28=compatTestRuntimeClasspath
io.javalin:javalin:3.12.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
io.strikt:strikt-core:0.28.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
javax.servlet:javax.servlet-api:3.1.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
net.swiftzer.semver:semver:1.1.1=compatTestRuntimeClasspath,default,runtimeClasspath,testRuntimeClasspath
org.apache.ivy:ivy:2.5.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.apache.maven:maven-repository-metadata:3.6.3=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.codehaus.plexus:plexus-utils:3.2.1=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.eclipse.jetty.websocket:websocket-api:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty.websocket:websocket-client:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty.websocket:websocket-common:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty.websocket:websocket-server:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty.websocket:websocket-servlet:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-client:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-http:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-io:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-security:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-server:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-servlet:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-util:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-webapp:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.eclipse.jetty:jetty-xml:9.4.31.v20200723=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.gradle:gradle-tooling-api:6.8-milestone-3=compileClasspath,compileOnly,compileOnlyDependenciesMetadata
org.jetbrains.intellij.deps:trove4j:1.0.20181211=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.4.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.4.10=kotlinCompilerPluginClasspath
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.4.10=kotlinCompilerPluginClasspath
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.4.10=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.4.10=kotlinCompilerPluginClasspath
org.jetbrains.kotlin:kotlin-script-runtime:1.4.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:1.4.10=kotlinCompilerPluginClasspath
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.4.10=kotlinCompilerPluginClasspath
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.4.10=kotlinCompilerPluginClasspath
org.jetbrains.kotlin:kotlin-scripting-jvm:1.4.10=kotlinCompilerPluginClasspath
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-test-annotations-common:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.jetbrains.kotlin:kotlin-test-common:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.jetbrains.kotlin:kotlin-test-junit5:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.jetbrains.kotlin:kotlin-test:1.4.10=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.3.9=compatTestRuntimeClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7=kotlinCompilerPluginClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9=compatTestRuntimeClasspath
org.jetbrains:annotations:13.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.junit.jupiter:junit-jupiter-engine:5.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.junit.jupiter:junit-jupiter-params:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
org.junit.platform:junit-platform-commons:1.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.junit.platform:junit-platform-engine:1.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.junit.platform:junit-platform-launcher:1.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.junit:junit-bom:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.opentest4j:opentest4j:1.2.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
org.slf4j:slf4j-api:1.7.28=compileClasspath,compileOnly,compileOnlyDependenciesMetadata
org.slf4j:slf4j-api:1.7.30=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
empty=annotationProcessor,apiDependenciesMetadata,archives,compatTestAnnotationProcessor,compatTestApiDependenciesMetadata,compatTestCompile,compatTestCompileOnly,compatTestCompileOnlyDependenciesMetadata,compatTestKotlinScriptDef,compatTestKotlinScriptDefExtensions,compatTestRuntime,compile,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,shadow,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime,testRuntimeOnlyDependenciesMetadata

View File

@@ -1,37 +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.google.code.gson:gson:2.8.5
commons-codec:commons-codec:1.9
commons-logging:commons-logging:1.2
de.undercouch:gradle-download-task:3.4.3
org.apache.httpcomponents:httpclient:4.5.3
org.apache.httpcomponents:httpcore:4.4.6
org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:1.3.3
org.gradle.kotlin:plugins:1.3.3
org.jetbrains.intellij.deps:trove4j:1.0.20181211
org.jetbrains.kotlin:kotlin-android-extensions:1.3.61
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.61
org.jetbrains.kotlin:kotlin-build-common:1.3.61
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.61
org.jetbrains.kotlin:kotlin-compiler-runner:1.3.61
org.jetbrains.kotlin:kotlin-daemon-client:1.3.61
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.3.61
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.3.61
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.3.61
org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61
org.jetbrains.kotlin:kotlin-native-utils:1.3.61
org.jetbrains.kotlin:kotlin-reflect:1.3.61
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.61
org.jetbrains.kotlin:kotlin-script-runtime:1.3.61
org.jetbrains.kotlin:kotlin-scripting-common:1.3.61
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.61
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.61
org.jetbrains.kotlin:kotlin-scripting-jvm: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.kotlin:kotlin-util-io:1.3.61
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1
org.jetbrains:annotations:13.0

View File

@@ -1,23 +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:2.4.3
dev.minutest:minutest:1.10.0
io.strikt:strikt-core:0.23.4
org.apiguardian:apiguardian-api:1.1.0
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.kotlin:kotlin-test-annotations-common:1.3.61
org.jetbrains.kotlin:kotlin-test-common:1.3.61
org.jetbrains.kotlin:kotlin-test-junit5:1.3.61
org.jetbrains.kotlin:kotlin-test:1.3.61
org.jetbrains:annotations:13.0
org.junit.jupiter:junit-jupiter-api:5.6.0
org.junit.jupiter:junit-jupiter-params:5.6.0
org.junit.platform:junit-platform-commons:1.6.0
org.junit:junit-bom:5.6.0
org.opentest4j:opentest4j:1.2.0

View File

@@ -1,30 +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.christophsturm:filepeek:0.1.1
com.squareup.moshi:moshi:1.9.2
com.squareup.okio:okio:2.4.3
dev.minutest:minutest:1.10.0
io.github.classgraph:classgraph:4.8.28
io.strikt:strikt-core:0.23.4
net.swiftzer.semver:semver:1.1.1
org.apiguardian:apiguardian-api:1.1.0
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.kotlin:kotlin-test-annotations-common:1.3.61
org.jetbrains.kotlin:kotlin-test-common:1.3.61
org.jetbrains.kotlin:kotlin-test-junit5:1.3.61
org.jetbrains.kotlin:kotlin-test:1.3.61
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3
org.jetbrains:annotations:13.0
org.junit.jupiter:junit-jupiter-api:5.6.0
org.junit.jupiter:junit-jupiter-engine:5.6.0
org.junit.jupiter:junit-jupiter-params:5.6.0
org.junit.platform:junit-platform-commons:1.6.0
org.junit.platform:junit-platform-engine:1.6.0
org.junit.platform:junit-platform-launcher:1.6.0
org.junit:junit-bom:5.6.0
org.opentest4j:opentest4j:1.2.0

View File

@@ -1,15 +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
org.apache.ivy:ivy:2.5.0
org.apache.maven:maven-repository-metadata:3.6.3
org.codehaus.plexus:plexus-utils:3.2.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

View File

@@ -1,9 +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.apache.ivy:ivy:2.5.0
org.apache.maven:maven-repository-metadata:3.6.3
org.codehaus.plexus:plexus-utils:3.2.1

View File

@@ -1,14 +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
org.apache.ivy:ivy:2.5.0
org.apache.maven:maven-repository-metadata:3.6.3
org.codehaus.plexus:plexus-utils:3.2.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

View File

@@ -1,15 +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.apache.ivy:ivy:2.5.0
org.apache.maven:maven-repository-metadata:3.6.3
org.codehaus.plexus:plexus-utils:3.2.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

View File

@@ -1,6 +1,7 @@
package org.nixos.gradle2nix package org.nixos.gradle2nix
import dev.minutest.Tests import dev.minutest.Tests
import dev.minutest.experimental.minus
import dev.minutest.junit.JUnit5Minutests import dev.minutest.junit.JUnit5Minutests
import dev.minutest.rootContext import dev.minutest.rootContext
import org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.BINTRAY_JCENTER_URL import org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.BINTRAY_JCENTER_URL
@@ -8,20 +9,28 @@ import org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.MAVEN_CENT
import strikt.api.expectThat import strikt.api.expectThat
import strikt.assertions.all import strikt.assertions.all
import strikt.assertions.containsExactly import strikt.assertions.containsExactly
import strikt.assertions.flatMap
import strikt.assertions.get import strikt.assertions.get
import strikt.assertions.hasSize import strikt.assertions.hasSize
import strikt.assertions.isEqualTo import strikt.assertions.isEqualTo
import strikt.assertions.map import strikt.assertions.map
import strikt.assertions.none
import strikt.assertions.startsWith import strikt.assertions.startsWith
class BasicTest : JUnit5Minutests { class BasicTest : JUnit5Minutests {
@Tests @Tests
fun tests() = rootContext<Fixture>("basic tests") { fun tests() = rootContext("basic tests") {
withFixture("basic/basic-java-project") { withFixture("basic/basic-java-project") {
test("builds basic java project") { test("builds basic java project") {
expectThat(build()) { expectThat(build()) {
get("gradle version") { gradle.version }.isEqualTo(System.getProperty("compat.gradle.version")) get("gradle version") { gradle.version }.isEqualTo(System.getProperty("compat.gradle.version"))
get("all dependencies") {
pluginDependencies +
rootProject.buildscriptDependencies +
rootProject.projectDependencies
}.flatMap { it.urls }.none { startsWith("file:") }
get("root project dependencies") { rootProject.projectDependencies }.and { get("root project dependencies") { rootProject.projectDependencies }.and {
ids.containsExactly( ids.containsExactly(
"com.squareup.moshi:moshi:1.8.0@jar", "com.squareup.moshi:moshi:1.8.0@jar",
@@ -47,5 +56,18 @@ class BasicTest : JUnit5Minutests {
} }
} }
} }
withFixture("basic/basic-kotlin-project") {
GRADLE_MIN("4.9") - test("excludes embedded kotlin repo") {
expectThat(build()) {
get("all dependencies") {
pluginDependencies +
rootProject.buildscriptDependencies +
rootProject.projectDependencies
}.flatMap { it.urls }.all { not { startsWith("file:") } }
}
}
}
} }
} }

View File

@@ -1,67 +1,99 @@
package org.nixos.gradle2nix package org.nixos.gradle2nix
import dev.minutest.Tests import dev.minutest.Tests
import dev.minutest.experimental.minus
import dev.minutest.junit.JUnit5Minutests import dev.minutest.junit.JUnit5Minutests
import dev.minutest.rootContext import dev.minutest.rootContext
import strikt.api.expectThat import strikt.api.expectThat
import strikt.assertions.all import strikt.assertions.all
import strikt.assertions.contains
import strikt.assertions.containsExactly import strikt.assertions.containsExactly
import strikt.assertions.filter import strikt.assertions.filter
import strikt.assertions.isEqualTo import strikt.assertions.isEqualTo
import strikt.assertions.isNotEqualTo
import strikt.assertions.isNotNull import strikt.assertions.isNotNull
import strikt.assertions.single import strikt.assertions.isNull
import strikt.assertions.startsWith
class DependencyTest : JUnit5Minutests { class DependencyTest : JUnit5Minutests {
@Tests @Tests
fun tests() = rootContext<Fixture>("dependency tests") { fun tests() = rootContext("dependency tests") {
withFixture("dependency/classifier") { withRepository("m2") {
test("resolves dependency with classifier") {
expectThat(build()) { withFixture("dependency/classifier") {
get("root project dependencies") { rootProject.projectDependencies }.ids.containsExactly( test("resolves dependency with classifier") {
"com.badlogicgames.gdx:gdx-parent:1.9.9@pom", expectThat(build()) {
"com.badlogicgames.gdx:gdx-platform:1.9.9:natives-desktop@jar", get("root project dependencies") { rootProject.projectDependencies }.ids.containsExactly(
"com.badlogicgames.gdx:gdx-platform:1.9.9@pom", "com.badlogicgames.gdx:gdx-parent:1.9.9@pom",
"org.sonatype.oss:oss-parent:5@pom" "com.badlogicgames.gdx:gdx-platform:1.9.9:natives-desktop@jar",
) "com.badlogicgames.gdx:gdx-platform:1.9.9@pom",
"org.sonatype.oss:oss-parent:5@pom"
)
}
} }
} }
}
withFixture("dependency/dynamic-snapshot") { withFixture("dependency/maven-bom") {
test("resolves snapshot dependency with dynamic version") { GRADLE_MIN("5.0") - test("resolves dependencies from maven bom platform") {
expectThat(build()) { expectThat(build()) {
get("root project dependencies") { rootProject.projectDependencies } get("root project dependencies") { rootProject.projectDependencies }
.filter { it.id.name == "packr" } .ids
.all { .containsExactly(
get("id.version") { id.version }.isEqualTo("-SNAPSHOT") "io.micrometer:micrometer-bom:1.5.1@pom",
get("timestamp") { timestamp }.isNotNull() "io.micrometer:micrometer-core:1.5.1@jar",
get("build") { build }.isNotNull() "io.micrometer:micrometer-core:1.5.1@pom",
} "org.hdrhistogram:HdrHistogram:2.1.12@jar",
} "org.hdrhistogram:HdrHistogram:2.1.12@pom"
}
}
withFixture("dependency/snapshot") {
test("resolves snapshot dependency") {
expectThat(build()) {
get("root project dependencies") { rootProject.projectDependencies }
.filter { it.id.name == "okio" }
.and {
ids.containsExactly(
"com.squareup.okio:okio:2.5.0-SNAPSHOT@jar",
"com.squareup.okio:okio:2.5.0-SNAPSHOT@module",
"com.squareup.okio:okio:2.5.0-SNAPSHOT@pom"
) )
all { }
}
}
withFixture("dependency/snapshot") {
test("resolves snapshot dependency") {
expectThat(build()) {
get("root project dependencies") { rootProject.projectDependencies }
.and {
ids.containsExactly(
"org.apache:test-SNAPSHOT2:2.0.2-SNAPSHOT@jar",
"org.apache:test-SNAPSHOT2:2.0.2-SNAPSHOT@pom"
)
all {
get("timestamp") { timestamp }.isNull()
get("build") { build }.isNotNull()
}
}
}
}
}
withFixture("dependency/snapshot-dynamic") {
test("resolves snapshot dependency with dynamic version") {
expectThat(build()) {
get("root project dependencies") { rootProject.projectDependencies }
.and {
ids.containsExactly(
"org.apache:test-SNAPSHOT1:2.0.2-SNAPSHOT@jar",
"org.apache:test-SNAPSHOT1:2.0.2-SNAPSHOT@pom"
)
all {
get("timestamp") { timestamp }.isEqualTo("20070310.181613")
get("build") { build }.isEqualTo(3)
}
}
}
}
}
withFixture("dependency/snapshot-redirect") {
test("resolves snapshot dependency with redirect") {
expectThat(build()) {
get("root project dependencies") { rootProject.projectDependencies }
.filter { it.id.name == "packr" }
.all {
get("id.version") { id.version }.isEqualTo("-SNAPSHOT")
get("timestamp") { timestamp }.isNotNull() get("timestamp") { timestamp }.isNotNull()
get("build") { build }.isNotNull() get("build") { build }.isNotNull()
get("urls") { urls }.single().startsWith(SONATYPE_OSS_URL)
} }
} }
} }
} }
} }

View File

@@ -12,7 +12,7 @@ import strikt.assertions.startsWith
class IvyTest : JUnit5Minutests { class IvyTest : JUnit5Minutests {
@Tests @Tests
fun tests() = rootContext<Fixture>("ivy tests") { fun tests() = rootContext("ivy tests") {
withFixture("ivy/basic") { withFixture("ivy/basic") {
test("resolves ivy dependencies") { test("resolves ivy dependencies") {
expectThat(build()) { expectThat(build()) {

View File

@@ -1,14 +1,17 @@
package org.nixos.gradle2nix package org.nixos.gradle2nix
import dev.minutest.Tests import dev.minutest.Tests
import dev.minutest.experimental.FOCUS
import dev.minutest.experimental.minus
import dev.minutest.junit.JUnit5Minutests import dev.minutest.junit.JUnit5Minutests
import dev.minutest.rootContext import dev.minutest.rootContext
import strikt.api.expectThat import strikt.api.expectThat
import strikt.assertions.contains import strikt.assertions.contains
import strikt.assertions.containsExactly
class PluginTest : JUnit5Minutests { class PluginTest : JUnit5Minutests {
@Tests @Tests
fun tests() = rootContext<Fixture>("plugin tests") { fun tests() = rootContext("plugin tests") {
withFixture("plugin/resolves-from-default-repo") { withFixture("plugin/resolves-from-default-repo") {
test("resolves plugin from default repo") { test("resolves plugin from default repo") {
expectThat(build()) { expectThat(build()) {

Some files were not shown because too many files have changed in this diff Show More