mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-11 23:40:37 -05:00
Compare commits
5 Commits
v1.0.0-rc2
...
lenient-co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b88ee98da2 | ||
|
|
59e8130e64 | ||
|
|
dd5d60e835 | ||
|
|
23cb225ccf | ||
|
|
c949f19891 |
@@ -4,6 +4,7 @@ plugins {
|
|||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
kotlin("kapt")
|
kotlin("kapt")
|
||||||
application
|
application
|
||||||
|
idea
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -18,6 +19,11 @@ 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 {
|
||||||
@@ -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 {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
# This is a Gradle generated file for dependency locking.
|
||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.github.ajalt:clikt:2.3.0
|
com.github.ajalt:clikt:2.6.0
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
com.squareup.moshi:moshi-adapters:1.9.2
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
com.squareup.moshi:moshi-kotlin:1.9.2
|
||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:2.4.3
|
com.squareup.okio:okio:2.6.0
|
||||||
org.gradle:gradle-tooling-api:6.1
|
org.gradle:gradle-tooling-api:6.3
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
org.slf4j:slf4j-api:2.0.0-alpha1
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
# This is a Gradle generated file for dependency locking.
|
||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.github.ajalt:clikt:2.3.0
|
com.github.ajalt:clikt:2.6.0
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
com.squareup.moshi:moshi-adapters:1.9.2
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
com.squareup.moshi:moshi-kotlin:1.9.2
|
||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:2.4.3
|
com.squareup.okio:okio:2.6.0
|
||||||
net.swiftzer.semver:semver:1.1.1
|
net.swiftzer.semver:semver:1.1.1
|
||||||
org.gradle:gradle-tooling-api:6.1
|
org.gradle:gradle-tooling-api:6.3
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
org.slf4j:slf4j-api:2.0.0-alpha1
|
||||||
org.slf4j:slf4j-simple:2.0.0-alpha1
|
org.slf4j:slf4j-simple:2.0.0-alpha1
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
# This is a Gradle generated file for dependency locking.
|
||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.github.ajalt:clikt:2.3.0
|
com.christophsturm:filepeek:0.1.2
|
||||||
|
com.github.ajalt:clikt:2.6.0
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
com.squareup.moshi:moshi-adapters:1.9.2
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
com.squareup.moshi:moshi-kotlin:1.9.2
|
||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:2.4.3
|
com.squareup.okio:okio:2.6.0
|
||||||
org.gradle:gradle-tooling-api:6.1
|
io.strikt:strikt-core:0.25.0
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.gradle:gradle-tooling-api:6.3
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
org.opentest4j:opentest4j:1.2.0
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
org.slf4j:slf4j-api:2.0.0-alpha1
|
||||||
|
org.spekframework.spek2:spek-dsl-jvm:2.0.10
|
||||||
|
|||||||
@@ -1,18 +1,31 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
# This is a Gradle generated file for dependency locking.
|
||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.github.ajalt:clikt:2.3.0
|
com.christophsturm:filepeek:0.1.2
|
||||||
|
com.github.ajalt:clikt:2.6.0
|
||||||
com.squareup.moshi:moshi-adapters:1.9.2
|
com.squareup.moshi:moshi-adapters:1.9.2
|
||||||
com.squareup.moshi:moshi-kotlin:1.9.2
|
com.squareup.moshi:moshi-kotlin:1.9.2
|
||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:2.4.3
|
com.squareup.okio:okio:2.6.0
|
||||||
|
io.github.classgraph:classgraph:4.8.37
|
||||||
|
io.strikt:strikt-core:0.25.0
|
||||||
net.swiftzer.semver:semver:1.1.1
|
net.swiftzer.semver:semver:1.1.1
|
||||||
org.gradle:gradle-tooling-api:6.1
|
org.apiguardian:apiguardian-api:1.1.0
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.gradle:gradle-tooling-api:6.3
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.71
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.71
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
org.junit.platform:junit-platform-commons:1.6.0
|
||||||
|
org.junit.platform:junit-platform-engine:1.6.0
|
||||||
|
org.junit:junit-bom:5.6.0
|
||||||
|
org.opentest4j:opentest4j:1.2.0
|
||||||
org.slf4j:slf4j-api:2.0.0-alpha1
|
org.slf4j:slf4j-api:2.0.0-alpha1
|
||||||
org.slf4j:slf4j-simple:2.0.0-alpha1
|
org.slf4j:slf4j-simple:2.0.0-alpha1
|
||||||
|
org.spekframework.spek2:spek-dsl-jvm:2.0.10
|
||||||
|
org.spekframework.spek2:spek-runner-junit5:2.0.10
|
||||||
|
org.spekframework.spek2:spek-runtime-jvm:2.0.10
|
||||||
|
|||||||
9
app/src/dist/share/gradle-env.nix
vendored
9
app/src/dist/share/gradle-env.nix
vendored
@@ -254,13 +254,18 @@ in stdenv.mkDerivation (args // {
|
|||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# use the init script here
|
||||||
|
TMPHOME=$(mktemp -d)
|
||||||
|
mkdir -p $TMPHOME/init.d
|
||||||
|
cp ${projectEnv.initScript} $TMPHOME/init.d
|
||||||
|
|
||||||
env \
|
env \
|
||||||
"GRADLE_USER_HOME=$(mktemp -d)" \
|
"GRADLE_USER_HOME=$TMPHOME" \
|
||||||
gradle --offline --no-daemon --no-build-cache \
|
gradle --offline --no-daemon --no-build-cache \
|
||||||
--info --full-stacktrace --warning-mode=all \
|
--info --full-stacktrace --warning-mode=all \
|
||||||
${optionalString enableParallelBuilding "--parallel"} \
|
${optionalString enableParallelBuilding "--parallel"} \
|
||||||
${optionalString enableDebug "-Dorg.gradle.debug=true"} \
|
${optionalString enableDebug "-Dorg.gradle.debug=true"} \
|
||||||
--init-script ${projectEnv.initScript} \
|
|
||||||
${concatStringsSep " " gradleFlags}
|
${concatStringsSep " " gradleFlags}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ fun ProjectConnection.getBuildModel(config: Config, path: String): DefaultBuild
|
|||||||
if (config.gradleArgs != null) addArguments(config.gradleArgs)
|
if (config.gradleArgs != null) addArguments(config.gradleArgs)
|
||||||
if (path.isNotEmpty()) addArguments("--project-dir=$path")
|
if (path.isNotEmpty()) addArguments("--project-dir=$path")
|
||||||
if (!config.quiet) {
|
if (!config.quiet) {
|
||||||
setColorOutput(true)
|
|
||||||
setStandardOutput(System.err)
|
setStandardOutput(System.err)
|
||||||
setStandardError(System.err)
|
setStandardError(System.err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import com.github.ajalt.clikt.parameters.options.default
|
|||||||
import com.github.ajalt.clikt.parameters.options.flag
|
import com.github.ajalt.clikt.parameters.options.flag
|
||||||
import com.github.ajalt.clikt.parameters.options.multiple
|
import com.github.ajalt.clikt.parameters.options.multiple
|
||||||
import com.github.ajalt.clikt.parameters.options.option
|
import com.github.ajalt.clikt.parameters.options.option
|
||||||
import com.github.ajalt.clikt.parameters.options.split
|
|
||||||
import com.github.ajalt.clikt.parameters.options.validate
|
import com.github.ajalt.clikt.parameters.options.validate
|
||||||
import com.github.ajalt.clikt.parameters.types.file
|
import com.github.ajalt.clikt.parameters.types.file
|
||||||
import com.squareup.moshi.Moshi
|
import com.squareup.moshi.Moshi
|
||||||
@@ -55,7 +54,7 @@ class Main : CliktCommand(
|
|||||||
private val includes: List<File> by option("--include", "-i",
|
private val includes: List<File> by option("--include", "-i",
|
||||||
metavar = "DIR",
|
metavar = "DIR",
|
||||||
help = "Add an additional project to include")
|
help = "Add an additional project to include")
|
||||||
.file(exists = true, fileOkay = false, folderOkay = true, readable = true)
|
.file(mustExist = true, canBeFile = false, canBeDir = true, mustBeReadable = true)
|
||||||
.multiple()
|
.multiple()
|
||||||
.validate { files ->
|
.validate { files ->
|
||||||
val failures = files.filterNot { it.isProjectRoot() }
|
val failures = files.filterNot { it.isProjectRoot() }
|
||||||
@@ -79,12 +78,12 @@ class Main : CliktCommand(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val outDir: File? by option("--out-dir", "-o",
|
val outDir: File? by option("--out-dir", "-o",
|
||||||
metavar = "DIR",
|
metavar = "DIR",
|
||||||
help = "Path to write generated files (default: PROJECT-DIR)")
|
help = "Path to write generated files (default: PROJECT-DIR)")
|
||||||
.file(fileOkay = false, folderOkay = true)
|
.file(canBeFile = false, canBeDir = true)
|
||||||
|
|
||||||
private val envFile: String by option("--env", "-e",
|
val envFile: String by option("--env", "-e",
|
||||||
metavar = "FILENAME",
|
metavar = "FILENAME",
|
||||||
help = "Prefix for environment files (.json and .nix)")
|
help = "Prefix for environment files (.json and .nix)")
|
||||||
.default("gradle-env")
|
.default("gradle-env")
|
||||||
@@ -105,8 +104,11 @@ class Main : CliktCommand(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Visible for testing
|
||||||
|
lateinit var config: Config
|
||||||
|
|
||||||
override fun run() {
|
override fun run() {
|
||||||
val config = Config(
|
config = Config(
|
||||||
gradleVersion,
|
gradleVersion,
|
||||||
gradleArgs,
|
gradleArgs,
|
||||||
configurations,
|
configurations,
|
||||||
|
|||||||
19
app/src/test/kotlin/org/nixos/gradle2nix/BuildSrcTest.kt
Normal file
19
app/src/test/kotlin/org/nixos/gradle2nix/BuildSrcTest.kt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import org.spekframework.spek2.Spek
|
||||||
|
import org.spekframework.spek2.style.specification.describe
|
||||||
|
import strikt.api.expectThat
|
||||||
|
import strikt.assertions.containsKey
|
||||||
|
|
||||||
|
object BuildSrcTest : Spek({
|
||||||
|
fixture("buildsrc/plugin-in-buildsrc/kotlin")
|
||||||
|
val fixture: Fixture by memoized()
|
||||||
|
|
||||||
|
describe("project with plugin in buildSrc") {
|
||||||
|
fixture.run()
|
||||||
|
|
||||||
|
it("should include buildSrc in gradle env", timeout = 0) {
|
||||||
|
expectThat(fixture.env()).containsKey("buildSrc")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
57
app/src/test/kotlin/org/nixos/gradle2nix/TestUtil.kt
Normal file
57
app/src/test/kotlin/org/nixos/gradle2nix/TestUtil.kt
Normal 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()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -50,7 +50,7 @@ allprojects {
|
|||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
wrapper {
|
wrapper {
|
||||||
gradleVersion = "6.1"
|
gradleVersion = "6.3"
|
||||||
distributionType = Wrapper.DistributionType.ALL
|
distributionType = Wrapper.DistributionType.ALL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
37
default.nix
37
default.nix
@@ -5,15 +5,34 @@ with pkgs;
|
|||||||
let
|
let
|
||||||
buildGradle = pkgs.callPackage ./gradle-env.nix {};
|
buildGradle = pkgs.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
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
plugins {
|
||||||
|
`java-library`
|
||||||
|
id("com.example.custom-spotless")
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("com.diffplug.spotless:spotless-plugin-gradle:3.28.1")
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.example
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
com.diffplug.gradle.spotless
|
||||||
|
}
|
||||||
|
|
||||||
|
spotless {
|
||||||
|
kotlin {
|
||||||
|
ktlint()
|
||||||
|
}
|
||||||
|
}
|
||||||
2588
gradle-env.json
2588
gradle-env.json
File diff suppressed because it is too large
Load Diff
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:1.16.0
|
com.squareup.okio:okio:1.16.0
|
||||||
net.swiftzer.semver:semver:1.1.1
|
net.swiftzer.semver:semver:1.1.1
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:1.16.0
|
com.squareup.okio:okio:1.16.0
|
||||||
net.swiftzer.semver:semver:1.1.1
|
net.swiftzer.semver:semver:1.1.1
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:1.16.0
|
com.squareup.okio:okio:1.16.0
|
||||||
net.swiftzer.semver:semver:1.1.1
|
net.swiftzer.semver:semver:1.1.1
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
|||||||
@@ -2,36 +2,33 @@
|
|||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.google.code.gson:gson:2.8.5
|
com.google.code.gson:gson:2.8.5
|
||||||
commons-codec:commons-codec:1.9
|
de.undercouch:gradle-download-task:4.0.2
|
||||||
commons-logging:commons-logging:1.2
|
org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:1.3.4
|
||||||
de.undercouch:gradle-download-task:3.4.3
|
org.gradle.kotlin:plugins:1.3.4
|
||||||
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.intellij.deps:trove4j:1.0.20181211
|
||||||
org.jetbrains.kotlin:kotlin-android-extensions:1.3.61
|
org.jetbrains.kotlin:kotlin-android-extensions:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.61
|
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-build-common:1.3.61
|
org.jetbrains.kotlin:kotlin-build-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.61
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-compiler-runner:1.3.61
|
org.jetbrains.kotlin:kotlin-compiler-runner:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-daemon-client:1.3.61
|
org.jetbrains.kotlin:kotlin-daemon-client:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.3.61
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.3.61
|
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.3.61
|
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61
|
org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-native-utils:1.3.61
|
org.jetbrains.kotlin:kotlin-native-utils:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.61
|
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-script-runtime:1.3.61
|
org.jetbrains.kotlin:kotlin-script-runtime:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-scripting-common:1.3.61
|
org.jetbrains.kotlin:kotlin-scripting-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.61
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.61
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.3.61
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-util-io:1.3.61
|
org.jetbrains.kotlin:kotlin-util-io:1.3.70
|
||||||
|
org.jetbrains.kotlin:kotlin-util-klib:1.3.70
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
|||||||
@@ -1,23 +1,24 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
# This is a Gradle generated file for dependency locking.
|
||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
|
com.christophsturm:filepeek:0.1.2
|
||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:2.4.3
|
com.squareup.okio:okio:2.6.0
|
||||||
dev.minutest:minutest:1.10.0
|
dev.minutest:minutest:1.11.0
|
||||||
io.strikt:strikt-core:0.23.4
|
io.strikt:strikt-core:0.25.0
|
||||||
org.apiguardian:apiguardian-api:1.1.0
|
org.apiguardian:apiguardian-api:1.1.0
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-test-annotations-common:1.3.61
|
org.jetbrains.kotlin:kotlin-test-annotations-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-test-common:1.3.61
|
org.jetbrains.kotlin:kotlin-test-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-test-junit5:1.3.61
|
org.jetbrains.kotlin:kotlin-test-junit5:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-test:1.3.61
|
org.jetbrains.kotlin:kotlin-test:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
org.junit.jupiter:junit-jupiter-api:5.6.0
|
org.junit.jupiter:junit-jupiter-api:5.7.0-M1
|
||||||
org.junit.jupiter:junit-jupiter-params:5.6.0
|
org.junit.jupiter:junit-jupiter-params:5.7.0-M1
|
||||||
org.junit.platform:junit-platform-commons:1.6.0
|
org.junit.platform:junit-platform-commons:1.7.0-M1
|
||||||
org.junit:junit-bom:5.6.0
|
org.junit:junit-bom:5.7.0-M1
|
||||||
org.opentest4j:opentest4j:1.2.0
|
org.opentest4j:opentest4j:1.2.0
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
# This is a Gradle generated file for dependency locking.
|
||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.christophsturm:filepeek:0.1.1
|
com.christophsturm:filepeek:0.1.2
|
||||||
com.squareup.moshi:moshi:1.9.2
|
com.squareup.moshi:moshi:1.9.2
|
||||||
com.squareup.okio:okio:2.4.3
|
com.squareup.okio:okio:2.6.0
|
||||||
dev.minutest:minutest:1.10.0
|
dev.minutest:minutest:1.11.0
|
||||||
io.github.classgraph:classgraph:4.8.28
|
io.github.classgraph:classgraph:4.8.28
|
||||||
io.strikt:strikt-core:0.23.4
|
io.strikt:strikt-core:0.25.0
|
||||||
net.swiftzer.semver:semver:1.1.1
|
net.swiftzer.semver:semver:1.1.1
|
||||||
org.apiguardian:apiguardian-api:1.1.0
|
org.apiguardian:apiguardian-api:1.1.0
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.71
|
||||||
org.jetbrains.kotlin:kotlin-test-annotations-common:1.3.61
|
org.jetbrains.kotlin:kotlin-test-annotations-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-test-common:1.3.61
|
org.jetbrains.kotlin:kotlin-test-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-test-junit5:1.3.61
|
org.jetbrains.kotlin:kotlin-test-junit5:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-test:1.3.61
|
org.jetbrains.kotlin:kotlin-test:1.3.70
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
org.junit.jupiter:junit-jupiter-api:5.6.0
|
org.junit.jupiter:junit-jupiter-api:5.7.0-M1
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.6.0
|
org.junit.jupiter:junit-jupiter-engine:5.7.0-M1
|
||||||
org.junit.jupiter:junit-jupiter-params:5.6.0
|
org.junit.jupiter:junit-jupiter-params:5.7.0-M1
|
||||||
org.junit.platform:junit-platform-commons:1.6.0
|
org.junit.platform:junit-platform-commons:1.7.0-M1
|
||||||
org.junit.platform:junit-platform-engine:1.6.0
|
org.junit.platform:junit-platform-engine:1.7.0-M1
|
||||||
org.junit.platform:junit-platform-launcher:1.6.0
|
org.junit.platform:junit-platform-launcher:1.7.0-M1
|
||||||
org.junit:junit-bom:5.6.0
|
org.junit:junit-bom:5.7.0-M1
|
||||||
org.opentest4j:opentest4j:1.2.0
|
org.opentest4j:opentest4j:1.2.0
|
||||||
|
|||||||
@@ -6,10 +6,11 @@ com.squareup.okio:okio:1.16.0
|
|||||||
org.apache.ivy:ivy:2.5.0
|
org.apache.ivy:ivy:2.5.0
|
||||||
org.apache.maven:maven-repository-metadata:3.6.3
|
org.apache.maven:maven-repository-metadata:3.6.3
|
||||||
org.codehaus.plexus:plexus-utils:3.2.1
|
org.codehaus.plexus:plexus-utils:3.2.1
|
||||||
org.gradle:gradle-tooling-api:6.1
|
org.gradle:gradle-tooling-api:6.3
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
org.slf4j:slf4j-api:1.7.28
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ com.squareup.okio:okio:1.16.0
|
|||||||
org.apache.ivy:ivy:2.5.0
|
org.apache.ivy:ivy:2.5.0
|
||||||
org.apache.maven:maven-repository-metadata:3.6.3
|
org.apache.maven:maven-repository-metadata:3.6.3
|
||||||
org.codehaus.plexus:plexus-utils:3.2.1
|
org.codehaus.plexus:plexus-utils:3.2.1
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ net.swiftzer.semver:semver:1.1.1
|
|||||||
org.apache.ivy:ivy:2.5.0
|
org.apache.ivy:ivy:2.5.0
|
||||||
org.apache.maven:maven-repository-metadata:3.6.3
|
org.apache.maven:maven-repository-metadata:3.6.3
|
||||||
org.codehaus.plexus:plexus-utils:3.2.1
|
org.codehaus.plexus:plexus-utils:3.2.1
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.3.61
|
org.jetbrains.kotlin:kotlin-reflect:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.61
|
org.jetbrains.kotlin:kotlin-stdlib:1.3.70
|
||||||
org.jetbrains:annotations:13.0
|
org.jetbrains:annotations:13.0
|
||||||
|
|||||||
@@ -52,12 +52,12 @@ internal class ConfigurationResolver(
|
|||||||
private val ivy = Ivy.newInstance(ivySettings)
|
private val ivy = Ivy.newInstance(ivySettings)
|
||||||
|
|
||||||
fun resolve(configuration: Configuration): List<DefaultArtifact> {
|
fun resolve(configuration: Configuration): List<DefaultArtifact> {
|
||||||
val resolved = configuration.resolvedConfiguration
|
val resolved = configuration.resolvedConfiguration.lenientConfiguration
|
||||||
|
|
||||||
val topLevelMetadata = resolved.firstLevelModuleDependencies
|
val topLevelMetadata = resolved.firstLevelModuleDependencies
|
||||||
.flatMap { resolveMetadata(it.moduleGroup, it.moduleName, it.moduleVersion) }
|
.flatMap { resolveMetadata(it.moduleGroup, it.moduleName, it.moduleVersion) }
|
||||||
|
|
||||||
val allArtifacts = resolved.resolvedArtifacts
|
val allArtifacts = resolved.artifacts
|
||||||
.filter { it.id.componentIdentifier is ModuleComponentIdentifier }
|
.filter { it.id.componentIdentifier is ModuleComponentIdentifier }
|
||||||
.flatMap(::resolve)
|
.flatMap(::resolve)
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ internal class ConfigurationResolver(
|
|||||||
val seen = mutableSetOf<ComponentArtifactIdentifier>()
|
val seen = mutableSetOf<ComponentArtifactIdentifier>()
|
||||||
return generateSequence(listOf(this)) { descs ->
|
return generateSequence(listOf(this)) { descs ->
|
||||||
val parents = descs.flatMap { it.parentDescriptors(seen) }
|
val parents = descs.flatMap { it.parentDescriptors(seen) }
|
||||||
seen.addAll(parents.map(ResolvedArtifactResult::id))
|
seen.addAll(parents.map(ResolvedArtifactResult::getId))
|
||||||
parents.takeUnless { it.isEmpty() }
|
parents.takeUnless { it.isEmpty() }
|
||||||
}.flatten().distinct().toList()
|
}.flatten().distinct().toList()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ private fun fetchDistSha256(url: String): String {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val nativePlatformJarRegex = Regex("""native-platform-([\d.]+)\.jar""")
|
private val nativePlatformJarRegex = Regex("""native-platform-([\d.]+(-(alpha|beta|milestone)-\d+)?)\.jar""")
|
||||||
|
|
||||||
private val Wrapper.sha256: String
|
private val Wrapper.sha256: String
|
||||||
get() {
|
get() {
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ internal open class PluginResolver @Inject constructor(
|
|||||||
) {
|
) {
|
||||||
private val configurations = pluginDependencyResolutionServices.configurationContainer
|
private val configurations = pluginDependencyResolutionServices.configurationContainer
|
||||||
|
|
||||||
private val resolver = ConfigurationResolverFactory(pluginDependencyResolutionServices.resolveRepositoryHandler)
|
private val resolver = ConfigurationResolverFactory(
|
||||||
.create(pluginDependencyResolutionServices.dependencyHandler)
|
pluginDependencyResolutionServices.resolveRepositoryHandler
|
||||||
|
).create(pluginDependencyResolutionServices.dependencyHandler)
|
||||||
|
|
||||||
fun resolve(pluginRequests: List<PluginRequest>): List<DefaultArtifact> {
|
fun resolve(pluginRequests: List<PluginRequest>): List<DefaultArtifact> {
|
||||||
val markerDependencies = pluginRequests.map {
|
val markerDependencies = pluginRequests.map {
|
||||||
|
|||||||
Reference in New Issue
Block a user