mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-11 15:30:38 -05:00
plugin: Support S3 repositories
This commit is contained in:
@@ -1,174 +1,176 @@
|
|||||||
cp <?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
<modelVersion>4.0.0</modelVersion>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
<groupId>io.micrometer</groupId>
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<artifactId>micrometer-bom</artifactId>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
<packaging>pom</packaging>
|
<artifactId>micrometer-bom</artifactId>
|
||||||
<dependencyManagement>
|
<version>1.5.1</version>
|
||||||
<dependencies>
|
<packaging>pom</packaging>
|
||||||
<dependency>
|
<dependencyManagement>
|
||||||
<groupId>io.micrometer</groupId>
|
<dependencies>
|
||||||
<artifactId>micrometer-core</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-core</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-jersey2</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-jersey2</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-appoptics</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-appoptics</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-atlas</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-atlas</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-azure-monitor</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-azure-monitor</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-cloudwatch</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-cloudwatch</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-cloudwatch2</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-cloudwatch2</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-datadog</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-datadog</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-dynatrace</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-dynatrace</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-elastic</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-elastic</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-ganglia</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-ganglia</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-graphite</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-graphite</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-humio</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-humio</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-influx</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-influx</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-jmx</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-jmx</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-kairos</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-kairos</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-new-relic</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-new-relic</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-opentsdb</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-opentsdb</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-prometheus</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-prometheus</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-signalfx</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-signalfx</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-stackdriver</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-stackdriver</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-statsd</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-statsd</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-registry-wavefront</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-registry-wavefront</artifactId>
|
||||||
<dependency>
|
<version>1.5.1</version>
|
||||||
<groupId>io.micrometer</groupId>
|
</dependency>
|
||||||
<artifactId>micrometer-test</artifactId>
|
<dependency>
|
||||||
<version>1.5.1</version>
|
<groupId>io.micrometer</groupId>
|
||||||
</dependency>
|
<artifactId>micrometer-test</artifactId>
|
||||||
</dependencies>
|
<version>1.5.1</version>
|
||||||
</dependencyManagement>
|
</dependency>
|
||||||
<name>micrometer-bom</name>
|
</dependencies>
|
||||||
<description>Micrometer BOM (Bill of Materials) for managing Micrometer artifact versions</description>
|
</dependencyManagement>
|
||||||
<licenses>
|
<name>micrometer-bom</name>
|
||||||
<license>
|
<description>Micrometer BOM (Bill of Materials) for managing Micrometer artifact versions</description>
|
||||||
<name>The Apache Software License, Version 2.0</name>
|
<licenses>
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
<license>
|
||||||
<distribution>repo</distribution>
|
<name>The Apache Software License, Version 2.0</name>
|
||||||
</license>
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
</licenses>
|
<distribution>repo</distribution>
|
||||||
<properties>
|
</license>
|
||||||
<nebula_Manifest_Version>1.0</nebula_Manifest_Version>
|
</licenses>
|
||||||
<nebula_Implementation_Title>io.micrometer#micrometer-bom;1.5.1</nebula_Implementation_Title>
|
<properties>
|
||||||
<nebula_Implementation_Version>1.5.1</nebula_Implementation_Version>
|
<nebula_Manifest_Version>1.0</nebula_Manifest_Version>
|
||||||
<nebula_Built_Status>release</nebula_Built_Status>
|
<nebula_Implementation_Title>io.micrometer#micrometer-bom;1.5.1</nebula_Implementation_Title>
|
||||||
<nebula_Built_By>circleci</nebula_Built_By>
|
<nebula_Implementation_Version>1.5.1</nebula_Implementation_Version>
|
||||||
<nebula_Built_OS>Linux</nebula_Built_OS>
|
<nebula_Built_Status>release</nebula_Built_Status>
|
||||||
<nebula_Build_Date>2020-05-08_16:43:24</nebula_Build_Date>
|
<nebula_Built_By>circleci</nebula_Built_By>
|
||||||
<nebula_Gradle_Version>6.4</nebula_Gradle_Version>
|
<nebula_Built_OS>Linux</nebula_Built_OS>
|
||||||
<nebula_Module_Source>/micrometer-bom</nebula_Module_Source>
|
<nebula_Build_Date>2020-05-08_16:43:24</nebula_Build_Date>
|
||||||
<nebula_Module_Origin>git@github.com:micrometer-metrics/micrometer.git</nebula_Module_Origin>
|
<nebula_Gradle_Version>6.4</nebula_Gradle_Version>
|
||||||
<nebula_Change>5984c10</nebula_Change>
|
<nebula_Module_Source>/micrometer-bom</nebula_Module_Source>
|
||||||
<nebula_Branch>5984c10fc12b781652e27a9ea95c439f96e73cf8</nebula_Branch>
|
<nebula_Module_Origin>git@github.com:micrometer-metrics/micrometer.git</nebula_Module_Origin>
|
||||||
<nebula_Build_Host>82db0d896427</nebula_Build_Host>
|
<nebula_Change>5984c10</nebula_Change>
|
||||||
<nebula_Build_Job>LOCAL</nebula_Build_Job>
|
<nebula_Branch>5984c10fc12b781652e27a9ea95c439f96e73cf8</nebula_Branch>
|
||||||
<nebula_Build_Number>LOCAL</nebula_Build_Number>
|
<nebula_Build_Host>82db0d896427</nebula_Build_Host>
|
||||||
<nebula_Build_Id>LOCAL</nebula_Build_Id>
|
<nebula_Build_Job>LOCAL</nebula_Build_Job>
|
||||||
<nebula_Created_By>14.0.1+7 (Oracle Corporation)</nebula_Created_By>
|
<nebula_Build_Number>LOCAL</nebula_Build_Number>
|
||||||
<nebula_Build_Java_Version>14.0.1</nebula_Build_Java_Version>
|
<nebula_Build_Id>LOCAL</nebula_Build_Id>
|
||||||
<nebula_Module_Owner>tludwig@vmware.com</nebula_Module_Owner>
|
<nebula_Created_By>14.0.1+7 (Oracle Corporation)</nebula_Created_By>
|
||||||
<nebula_Module_Email>tludwig@vmware.com</nebula_Module_Email>
|
<nebula_Build_Java_Version>14.0.1</nebula_Build_Java_Version>
|
||||||
</properties>
|
<nebula_Module_Owner>tludwig@vmware.com</nebula_Module_Owner>
|
||||||
<url>https://github.com/micrometer-metrics/micrometer</url>
|
<nebula_Module_Email>tludwig@vmware.com</nebula_Module_Email>
|
||||||
<scm>
|
</properties>
|
||||||
<url>git@github.com:micrometer-metrics/micrometer.git</url>
|
<url>https://github.com/micrometer-metrics/micrometer</url>
|
||||||
</scm>
|
<scm>
|
||||||
<developers>
|
<url>git@github.com:micrometer-metrics/micrometer.git</url>
|
||||||
<developer>
|
</scm>
|
||||||
<id>shakuzen</id>
|
<developers>
|
||||||
<name>Tommy Ludwig</name>
|
<developer>
|
||||||
<email>tludwig@vmware.com</email>
|
<id>shakuzen</id>
|
||||||
</developer>
|
<name>Tommy Ludwig</name>
|
||||||
</developers>
|
<email>tludwig@vmware.com</email>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
fb57aac12f2370e7115ab8af5265322397cae49e
|
07e9957e505eb062485e8ba52d14620e38baf45d
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
88e79ca0e696263e63bc9dc759a2e9c0d66e36d9
|
||||||
24
fixtures/repositories/m2/org/apache/test/maven-metadata.xml
Normal file
24
fixtures/repositories/m2/org/apache/test/maven-metadata.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
<metadata>
|
||||||
|
<groupId>org.apache</groupId>
|
||||||
|
<artifactId>test</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</metadata>
|
||||||
17
fixtures/s3/maven-snapshot/groovy/build.gradle
Normal file
17
fixtures/s3/maven-snapshot/groovy/build.gradle
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id('java')
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url "s3://repositories/m2"
|
||||||
|
credentials(AwsCredentials) {
|
||||||
|
accessKey "foo"
|
||||||
|
secretKey "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test-SNAPSHOT1:2.0.0-SNAPSHOT")
|
||||||
|
}
|
||||||
0
fixtures/s3/maven-snapshot/groovy/settings.gradle
Normal file
0
fixtures/s3/maven-snapshot/groovy/settings.gradle
Normal file
17
fixtures/s3/maven-snapshot/kotlin/build.gradle.kts
Normal file
17
fixtures/s3/maven-snapshot/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("s3://repositories/m2")
|
||||||
|
credentials(AwsCredentials::class) {
|
||||||
|
accessKey = "foo"
|
||||||
|
secretKey = "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test-SNAPSHOT1:2.0.0-SNAPSHOT")
|
||||||
|
}
|
||||||
17
fixtures/s3/maven/groovy/build.gradle
Normal file
17
fixtures/s3/maven/groovy/build.gradle
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id('java')
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url "s3://repositories/m2"
|
||||||
|
credentials(AwsCredentials) {
|
||||||
|
accessKey "foo"
|
||||||
|
secretKey "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test:1.0.0")
|
||||||
|
}
|
||||||
0
fixtures/s3/maven/groovy/settings.gradle
Normal file
0
fixtures/s3/maven/groovy/settings.gradle
Normal file
17
fixtures/s3/maven/kotlin/build.gradle.kts
Normal file
17
fixtures/s3/maven/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("s3://repositories/m2")
|
||||||
|
credentials(AwsCredentials::class) {
|
||||||
|
accessKey = "foo"
|
||||||
|
secretKey = "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.apache:test:1.0.0")
|
||||||
|
}
|
||||||
0
fixtures/s3/maven/kotlin/settings.gradle.kts
Normal file
0
fixtures/s3/maven/kotlin/settings.gradle.kts
Normal file
3795
gradle-env.json
3795
gradle-env.json
File diff suppressed because it is too large
Load Diff
24
ivy/build.gradle.kts
Normal file
24
ivy/build.gradle.kts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api("org.apache.ivy:ivy:latest.release")
|
||||||
|
api("com.amazonaws:aws-java-sdk-s3:latest.release")
|
||||||
|
|
||||||
|
testImplementation("com.adobe.testing:s3mock-junit5:latest.release")
|
||||||
|
testImplementation("io.strikt:strikt-core:latest.release")
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter-api:latest.release")
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter-params:latest.release")
|
||||||
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:latest.release")
|
||||||
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:latest.release")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
test {
|
||||||
|
useJUnitPlatform {
|
||||||
|
includeEngines("junit-jupiter")
|
||||||
|
}
|
||||||
|
systemProperty("fixtures", "$rootDir/fixtures")
|
||||||
|
}
|
||||||
|
}
|
||||||
123
ivy/gradle.lockfile
Normal file
123
ivy/gradle.lockfile
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
# This is a Gradle generated file for dependency locking.
|
||||||
|
# Manual edits can break the build and are not advised.
|
||||||
|
# This file is expected to be part of source control.
|
||||||
|
ch.qos.logback:logback-classic:1.2.3=testCompileClasspath,testRuntimeClasspath
|
||||||
|
ch.qos.logback:logback-core:1.2.3=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.adobe.testing:s3mock-junit5:2.1.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.adobe.testing:s3mock-testsupport-common:2.1.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.adobe.testing:s3mock:2.1.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:aws-java-sdk-core:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:aws-java-sdk-kms:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:aws-java-sdk-s3:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.amazonaws:jmespath-java:1.11.946=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.christophsturm:filepeek:0.1.2=testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-annotations:2.6.0=compileClasspath,runtimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-annotations:2.9.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-core:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-databind:2.6.7.4=compileClasspath,runtimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-databind:2.9.9.3=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.9=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml.woodstox:woodstox-core:5.1.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.fasterxml:classmate:1.3.4=testCompileClasspath,testRuntimeClasspath
|
||||||
|
com.typesafe.netty:netty-reactive-streams-http:2.0.0=testRuntimeClasspath
|
||||||
|
com.typesafe.netty:netty-reactive-streams:2.0.0=testRuntimeClasspath
|
||||||
|
commons-codec:commons-codec:1.11=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
commons-io:commons-io:2.6=testCompileClasspath,testRuntimeClasspath
|
||||||
|
commons-logging:commons-logging:1.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
io.netty:netty-buffer:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-codec-http2:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-codec-http:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-codec:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-common:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-handler:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-resolver:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-transport-native-epoll:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-transport-native-unix-common:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.netty:netty-transport:4.1.33.Final=testRuntimeClasspath
|
||||||
|
io.strikt:strikt-core:0.28.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
javax.annotation:javax.annotation-api:1.3.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
javax.servlet:javax.servlet-api:3.1.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
javax.validation:validation-api:2.0.1.Final=testCompileClasspath,testRuntimeClasspath
|
||||||
|
joda-time:joda-time:2.8.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.commons:commons-lang3:3.8.1=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpclient:4.5.13=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpcore:4.4.13=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.ivy:ivy:2.5.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.logging.log4j:log4j-api:2.11.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apache.logging.log4j:log4j-to-slf4j:2.11.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.codehaus.woodstox:stax2-api:4.1=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-continuation:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-http:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-io:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-security:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-server:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-servlet:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-servlets:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-util:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-webapp:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-xml:9.4.19.v20190610=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.hibernate.validator:hibernate-validator:6.0.17.Final=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jboss.logging:jboss-logging:3.3.2.Final=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-reflect:1.4.21-2=testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.20=compileClasspath,runtimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.21-2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.2=testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2=testRuntimeClasspath
|
||||||
|
org.jetbrains:annotations:13.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-engine:5.7.0=testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-params:5.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-commons:1.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-engine:1.7.0=testRuntimeClasspath
|
||||||
|
org.junit.platform:junit-platform-launcher:1.7.0=testRuntimeClasspath
|
||||||
|
org.junit:junit-bom:5.7.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.mortbay.jasper:apache-el:8.5.40=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.reactivestreams:reactive-streams:1.0.2=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.slf4j:jul-to-slf4j:1.7.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.slf4j:slf4j-api:1.7.28=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-autoconfigure:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-jetty:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-json:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-logging:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-web:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot:2.1.9.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-aop:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-beans:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-context:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-core:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-expression:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-jcl:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-web:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.springframework:spring-webmvc:5.1.10.RELEASE=testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.yaml:snakeyaml:1.23=testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:annotations:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:apache-client:2.7.19=testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:auth:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-core:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-query-protocol:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-xml-protocol:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:http-client-spi:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:netty-nio-client:2.7.19=testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:profiles:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:protocol-core:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:regions:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:s3:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:sdk-core:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:url-connection-client:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.awssdk:utils:2.7.19=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.eventstream:eventstream:1.0.1=testCompileClasspath,testRuntimeClasspath
|
||||||
|
software.amazon.ion:ion-java:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
empty=
|
||||||
294
ivy/src/main/kotlin/org/nixos/gradle2nix/S3.kt
Normal file
294
ivy/src/main/kotlin/org/nixos/gradle2nix/S3.kt
Normal file
@@ -0,0 +1,294 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import com.amazonaws.AmazonServiceException
|
||||||
|
import com.amazonaws.ClientConfiguration
|
||||||
|
import com.amazonaws.auth.AWSCredentials
|
||||||
|
import com.amazonaws.auth.AWSStaticCredentialsProvider
|
||||||
|
import com.amazonaws.client.builder.AwsClientBuilder
|
||||||
|
import com.amazonaws.regions.Region
|
||||||
|
import com.amazonaws.regions.RegionUtils
|
||||||
|
import com.amazonaws.regions.Regions
|
||||||
|
import com.amazonaws.services.s3.AmazonS3
|
||||||
|
import com.amazonaws.services.s3.AmazonS3ClientBuilder
|
||||||
|
import com.amazonaws.services.s3.model.GetObjectRequest
|
||||||
|
import com.amazonaws.services.s3.model.ListObjectsRequest
|
||||||
|
import com.amazonaws.services.s3.model.ObjectMetadata
|
||||||
|
import com.amazonaws.services.s3.model.S3Object
|
||||||
|
import com.amazonaws.services.s3.model.S3ObjectInputStream
|
||||||
|
import com.amazonaws.util.AwsHostNameUtils
|
||||||
|
import org.apache.http.conn.ssl.NoopHostnameVerifier
|
||||||
|
import org.apache.http.conn.ssl.SSLConnectionSocketFactory
|
||||||
|
import org.apache.ivy.core.settings.TimeoutConstraint
|
||||||
|
import org.apache.ivy.plugins.repository.AbstractRepository
|
||||||
|
import org.apache.ivy.plugins.repository.RepositoryCopyProgressListener
|
||||||
|
import org.apache.ivy.plugins.repository.Resource
|
||||||
|
import org.apache.ivy.plugins.repository.TransferEvent
|
||||||
|
import org.apache.ivy.util.FileUtil
|
||||||
|
import java.io.File
|
||||||
|
import java.io.FileOutputStream
|
||||||
|
import java.io.IOException
|
||||||
|
import java.io.InputStream
|
||||||
|
import java.net.Socket
|
||||||
|
import java.net.URI
|
||||||
|
import java.security.KeyManagementException
|
||||||
|
import java.security.NoSuchAlgorithmException
|
||||||
|
import java.security.SecureRandom
|
||||||
|
import java.security.cert.X509Certificate
|
||||||
|
import javax.net.ssl.SSLContext
|
||||||
|
import javax.net.ssl.SSLEngine
|
||||||
|
import javax.net.ssl.TrustManager
|
||||||
|
import javax.net.ssl.X509ExtendedTrustManager
|
||||||
|
|
||||||
|
|
||||||
|
class S3Repository(
|
||||||
|
private val client: AmazonS3,
|
||||||
|
timeoutConstraint: TimeoutConstraint? = null
|
||||||
|
) : AbstractRepository(timeoutConstraint) {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
credentials: AWSCredentials?,
|
||||||
|
endpoint: URI?,
|
||||||
|
timeoutConstraint: TimeoutConstraint?
|
||||||
|
) : this(
|
||||||
|
AmazonS3ClientBuilder.standard().apply {
|
||||||
|
credentials?.let { setCredentials(AWSStaticCredentialsProvider(it)) }
|
||||||
|
|
||||||
|
if (endpoint != null) {
|
||||||
|
setEndpointConfiguration(
|
||||||
|
AwsClientBuilder.EndpointConfiguration(
|
||||||
|
endpoint.toString(),
|
||||||
|
AwsHostNameUtils.parseRegion(endpoint.host, null) ?: Regions.US_EAST_1.name
|
||||||
|
)
|
||||||
|
)
|
||||||
|
isChunkedEncodingDisabled = true
|
||||||
|
isPathStyleAccessEnabled = true
|
||||||
|
} else {
|
||||||
|
region = Regions.US_EAST_1.name
|
||||||
|
}
|
||||||
|
|
||||||
|
if (System.getProperty("org.nixos.gradle2nix.s3test") != null) {
|
||||||
|
clientConfiguration = ClientConfiguration().apply {
|
||||||
|
apacheHttpClientConfig.sslSocketFactory = SSLConnectionSocketFactory(
|
||||||
|
createBlindlyTrustingSslContext(),
|
||||||
|
NoopHostnameVerifier.INSTANCE
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.build(),
|
||||||
|
timeoutConstraint
|
||||||
|
)
|
||||||
|
|
||||||
|
private val cache = mutableMapOf<String, S3Resource>()
|
||||||
|
|
||||||
|
private val progress = RepositoryCopyProgressListener(this)
|
||||||
|
|
||||||
|
override fun getResource(source: String): Resource =
|
||||||
|
cache.getOrPut(source) { S3Resource(this, URI(source)) }
|
||||||
|
|
||||||
|
override fun get(source: String, destination: File) {
|
||||||
|
fireTransferInitiated(getResource(source), TransferEvent.REQUEST_GET)
|
||||||
|
try {
|
||||||
|
val res = getResource(source)
|
||||||
|
val totalLength = res.contentLength
|
||||||
|
if (totalLength > 0) {
|
||||||
|
progress.totalLength = totalLength
|
||||||
|
}
|
||||||
|
destination.parentFile?.mkdirs()
|
||||||
|
FileUtil.copy(
|
||||||
|
res.openStream(),
|
||||||
|
FileOutputStream(destination),
|
||||||
|
progress,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
fireTransferCompleted(res.contentLength)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
fireTransferError(e)
|
||||||
|
throw e
|
||||||
|
} finally {
|
||||||
|
progress.totalLength = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun list(parent: String): List<String> =
|
||||||
|
S3Resource(this, URI(parent))
|
||||||
|
.let { resource ->
|
||||||
|
generateSequence({
|
||||||
|
try {
|
||||||
|
withClient(resource) {
|
||||||
|
listObjects(
|
||||||
|
ListObjectsRequest()
|
||||||
|
.withBucketName(resource.bucket)
|
||||||
|
.withPrefix(resource.key)
|
||||||
|
.withDelimiter("/")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
throw S3RepositoryException(e)
|
||||||
|
}
|
||||||
|
}) { prev ->
|
||||||
|
if (!prev.isTruncated) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
withClient(resource) {
|
||||||
|
listNextBatchOfObjects(prev)
|
||||||
|
}
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
throw S3RepositoryException(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.flatMap { listing ->
|
||||||
|
listing.commonPrefixes.asSequence() +
|
||||||
|
listing.objectSummaries.asSequence().map { it.key }
|
||||||
|
}
|
||||||
|
.toList()
|
||||||
|
|
||||||
|
internal fun <T> withClient(
|
||||||
|
resource: S3Resource,
|
||||||
|
block: AmazonS3.() -> T
|
||||||
|
): T = client.apply {
|
||||||
|
resource.region?.let { setRegion(it) }
|
||||||
|
}.block()
|
||||||
|
}
|
||||||
|
|
||||||
|
class S3Resource(
|
||||||
|
private val repository: S3Repository,
|
||||||
|
private val url: URI
|
||||||
|
) : Resource {
|
||||||
|
|
||||||
|
private val source: Source by lazy {
|
||||||
|
REGIONAL_ENDPOINT_PATTERN.find(url.normalize().toString())
|
||||||
|
?.let {
|
||||||
|
val (bucket, region, _, key) = it.destructured
|
||||||
|
Source(
|
||||||
|
bucket = bucket,
|
||||||
|
key = key,
|
||||||
|
region = when (region) {
|
||||||
|
"external-1" -> Region.getRegion(Regions.US_EAST_1)
|
||||||
|
else -> RegionUtils.getRegion(region)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
?: Source(
|
||||||
|
bucket = url.bucket(),
|
||||||
|
key = url.key(),
|
||||||
|
region = null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val metadata: Metadata by lazy {
|
||||||
|
try {
|
||||||
|
getMetadata()
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
null
|
||||||
|
}?.let { meta ->
|
||||||
|
Metadata(
|
||||||
|
exists = true,
|
||||||
|
contentLength = meta.contentLength,
|
||||||
|
lastModified = meta.lastModified.time
|
||||||
|
)
|
||||||
|
} ?: Metadata(
|
||||||
|
exists = false,
|
||||||
|
contentLength = 0,
|
||||||
|
lastModified = 0
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
val bucket: String get() = source.bucket
|
||||||
|
|
||||||
|
val key: String get() = source.key
|
||||||
|
|
||||||
|
val region: Region? get() = source.region
|
||||||
|
|
||||||
|
override fun getName(): String = url.toString()
|
||||||
|
|
||||||
|
override fun getLastModified(): Long = metadata.lastModified
|
||||||
|
|
||||||
|
override fun getContentLength(): Long = metadata.contentLength
|
||||||
|
|
||||||
|
override fun exists(): Boolean = metadata.exists
|
||||||
|
|
||||||
|
override fun isLocal(): Boolean = false
|
||||||
|
|
||||||
|
override fun clone(cloneName: String): Resource = S3Resource(repository, URI(cloneName))
|
||||||
|
|
||||||
|
override fun openStream(): InputStream =
|
||||||
|
try { getContent() }
|
||||||
|
catch (e: AmazonServiceException) { throw S3RepositoryException(e) }
|
||||||
|
?: throw S3RepositoryException()
|
||||||
|
|
||||||
|
private fun getMetadata(): ObjectMetadata? =
|
||||||
|
getObject(withContent = false)?.objectMetadata
|
||||||
|
|
||||||
|
private fun getContent(): S3ObjectInputStream? =
|
||||||
|
getObject(withContent = true)?.objectContent
|
||||||
|
|
||||||
|
private fun getObject(withContent: Boolean = true): S3Object? {
|
||||||
|
val request = GetObjectRequest(bucket, key)
|
||||||
|
if (!withContent) {
|
||||||
|
request.setRange(0, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return try {
|
||||||
|
repository.withClient(this) { getObject(request) }
|
||||||
|
} catch (e: AmazonServiceException) {
|
||||||
|
val errorCode = e.errorCode
|
||||||
|
if (errorCode != null && "NoSuchKey".compareTo(errorCode, ignoreCase = true) == 0) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
|
e.printStackTrace()
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private data class Source(
|
||||||
|
val bucket: String,
|
||||||
|
val key: String,
|
||||||
|
val region: Region?
|
||||||
|
)
|
||||||
|
|
||||||
|
private data class Metadata(
|
||||||
|
val exists: Boolean,
|
||||||
|
val contentLength: Long,
|
||||||
|
val lastModified: Long
|
||||||
|
)
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val REGIONAL_ENDPOINT_PATTERN =
|
||||||
|
Regex("""^s3://(.+)?\.s3[.-]([a-z0-9-]+)\.amazonaws\.com(\.[a-z]+)?/(.+)""")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class S3RepositoryException : RuntimeException {
|
||||||
|
constructor() : super()
|
||||||
|
|
||||||
|
constructor(throwable: Throwable) : super(throwable)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun URI.bucket(): String = normalize().host
|
||||||
|
|
||||||
|
private fun URI.key(): String = normalize().path.removePrefix("/")
|
||||||
|
|
||||||
|
// Used for testing.
|
||||||
|
private fun createBlindlyTrustingSslContext(): SSLContext? {
|
||||||
|
return try {
|
||||||
|
SSLContext.getInstance("TLS").apply {
|
||||||
|
init(null, arrayOf<TrustManager>(object : X509ExtendedTrustManager() {
|
||||||
|
override fun getAcceptedIssuers(): Array<X509Certificate>? = null
|
||||||
|
override fun checkClientTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: Socket?) {}
|
||||||
|
override fun checkClientTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: SSLEngine?) {}
|
||||||
|
override fun checkClientTrusted(certs: Array<X509Certificate?>?, authType: String?) {}
|
||||||
|
override fun checkServerTrusted(certs: Array<X509Certificate?>?, authType: String?) {}
|
||||||
|
override fun checkServerTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: Socket?) {}
|
||||||
|
override fun checkServerTrusted(arg0: Array<X509Certificate?>?, arg1: String?, arg2: SSLEngine?) {}
|
||||||
|
}), SecureRandom())
|
||||||
|
}
|
||||||
|
} catch (e: NoSuchAlgorithmException) {
|
||||||
|
throw RuntimeException("Unexpected exception", e)
|
||||||
|
} catch (e: KeyManagementException) {
|
||||||
|
throw RuntimeException("Unexpected exception", e)
|
||||||
|
}
|
||||||
|
}
|
||||||
113
ivy/src/test/kotlin/org/nixos/gradle2nix/S3Test.kt
Normal file
113
ivy/src/test/kotlin/org/nixos/gradle2nix/S3Test.kt
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import com.adobe.testing.s3mock.junit5.S3MockExtension
|
||||||
|
import com.amazonaws.services.s3.AmazonS3
|
||||||
|
import org.apache.ivy.ant.IvyDependencyArtifact
|
||||||
|
import org.apache.ivy.core.module.descriptor.Artifact
|
||||||
|
import org.apache.ivy.core.module.descriptor.DefaultArtifact
|
||||||
|
import org.apache.ivy.core.module.id.ArtifactRevisionId
|
||||||
|
import org.apache.ivy.core.module.id.ModuleRevisionId
|
||||||
|
import org.apache.ivy.core.settings.IvySettings
|
||||||
|
import org.apache.ivy.plugins.repository.Resource
|
||||||
|
import org.apache.ivy.plugins.resolver.IBiblioResolver
|
||||||
|
import org.apache.ivy.plugins.resolver.URLResolver
|
||||||
|
import org.junit.jupiter.api.BeforeAll
|
||||||
|
import org.junit.jupiter.api.Test
|
||||||
|
import org.junit.jupiter.api.TestInstance
|
||||||
|
import org.junit.jupiter.api.extension.RegisterExtension
|
||||||
|
import strikt.api.expectThat
|
||||||
|
import strikt.assertions.containsExactly
|
||||||
|
import strikt.assertions.isEmpty
|
||||||
|
import strikt.assertions.isEqualTo
|
||||||
|
import strikt.assertions.isFalse
|
||||||
|
import strikt.assertions.isNotEqualTo
|
||||||
|
import strikt.assertions.isNotNull
|
||||||
|
import strikt.assertions.isTrue
|
||||||
|
import java.io.File
|
||||||
|
import java.net.URI
|
||||||
|
import kotlin.io.path.ExperimentalPathApi
|
||||||
|
import kotlin.io.path.createTempDirectory
|
||||||
|
|
||||||
|
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||||
|
class S3Test {
|
||||||
|
companion object {
|
||||||
|
const val bucket = "repositories"
|
||||||
|
|
||||||
|
val fixtureRoot = File(System.getProperty("fixtures")).resolve(bucket)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
@RegisterExtension
|
||||||
|
val s3mock: S3MockExtension = S3MockExtension.builder().withInitialBuckets(bucket).build()
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
fun populateBucket(client: AmazonS3) {
|
||||||
|
fixtureRoot.walkTopDown()
|
||||||
|
.filter { it.isFile }
|
||||||
|
.forEach { file ->
|
||||||
|
val key = file.toRelativeString(fixtureRoot)
|
||||||
|
client.putObject(bucket, key, file)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun listsContents(client: AmazonS3) {
|
||||||
|
val repository = S3Repository(client)
|
||||||
|
expectThat(repository.list("s3://repositories/m2/org/apache/test/1.0.0/")).containsExactly(
|
||||||
|
"m2/org/apache/test/1.0.0/test-1.0.0.jar",
|
||||||
|
"m2/org/apache/test/1.0.0/test-1.0.0.pom",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun findsResourceMetadata(client: AmazonS3) {
|
||||||
|
val repository = S3Repository(client)
|
||||||
|
val resource: Resource = S3Resource(repository, URI("s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"))
|
||||||
|
expectThat(resource).and {
|
||||||
|
get { exists() }.isTrue()
|
||||||
|
get { contentLength }.isNotEqualTo(-1L)
|
||||||
|
get { lastModified }.isNotEqualTo(-1L)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun downloadsResource(client: AmazonS3) {
|
||||||
|
val repository = S3Repository(client)
|
||||||
|
val resource: Resource = S3Resource(repository, URI("s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"))
|
||||||
|
val source = fixtureRoot.resolve("m2/org/apache/test/1.0.0/test-1.0.0.pom").readText()
|
||||||
|
|
||||||
|
expectThat(resource.openStream().bufferedReader().readText()).isEqualTo(source)
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExperimentalPathApi
|
||||||
|
@Test
|
||||||
|
fun locatesArtifact(client: AmazonS3) {
|
||||||
|
val resolver = IBiblioResolver().apply {
|
||||||
|
name = "s3"
|
||||||
|
root = "s3://repositories/m2/"
|
||||||
|
isM2compatible = true
|
||||||
|
settings = IvySettings().apply {
|
||||||
|
defaultInit()
|
||||||
|
setDefaultRepositoryCacheBasedir(createTempDirectory().toString())
|
||||||
|
}
|
||||||
|
repository = S3Repository(client)
|
||||||
|
}
|
||||||
|
val origin = resolver.locate(DefaultArtifact(
|
||||||
|
ArtifactRevisionId.newInstance(
|
||||||
|
ModuleRevisionId.newInstance("org.apache", "test", "1.0.0"),
|
||||||
|
"test",
|
||||||
|
"jar",
|
||||||
|
"jar"
|
||||||
|
),
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
false
|
||||||
|
))
|
||||||
|
|
||||||
|
expectThat(origin).isNotNull().and {
|
||||||
|
get { isExists }.isTrue()
|
||||||
|
get { isLocal }.isFalse()
|
||||||
|
get { location }.isEqualTo("s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
5
plugin/.stutter/java11.lock
Normal file
5
plugin/.stutter/java11.lock
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# DO NOT MODIFY: Generated by Stutter plugin.
|
||||||
|
5.0
|
||||||
|
5.6.4
|
||||||
|
6.0.1
|
||||||
|
6.8.1
|
||||||
@@ -4,5 +4,4 @@
|
|||||||
5.0
|
5.0
|
||||||
5.6.4
|
5.6.4
|
||||||
6.0.1
|
6.0.1
|
||||||
6.7.1
|
6.8.1
|
||||||
6.8-milestone-3
|
|
||||||
|
|||||||
@@ -11,10 +11,8 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
compatTest {
|
test {
|
||||||
resources {
|
java.srcDir("src/test/kotlin")
|
||||||
srcDir("$rootDir/fixtures")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,32 +27,26 @@ configurations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly("org.gradle:gradle-tooling-api:${gradle.gradleVersion}")
|
||||||
|
implementation("org.apache.maven:maven-repository-metadata:latest.release")
|
||||||
|
implementation(project(":ivy"))
|
||||||
implementation(project(":model"))
|
implementation(project(":model"))
|
||||||
shadow(gradleApi())
|
shadow(gradleApi())
|
||||||
compileOnly("org.gradle:gradle-tooling-api:${gradle.gradleVersion}")
|
|
||||||
implementation("org.apache.ivy:ivy:latest.release")
|
|
||||||
implementation("org.apache.maven:maven-repository-metadata:latest.release")
|
|
||||||
|
|
||||||
|
compatTestImplementation("com.adobe.testing:s3mock-junit5:latest.release")
|
||||||
|
compatTestImplementation("com.squareup.okio:okio:latest.release")
|
||||||
|
compatTestImplementation("dev.minutest:minutest:latest.release")
|
||||||
|
compatTestImplementation("io.javalin:javalin:latest.release")
|
||||||
|
compatTestImplementation("io.strikt:strikt-core:latest.release")
|
||||||
|
compatTestImplementation("org.junit.jupiter:junit-jupiter-api:latest.release")
|
||||||
|
compatTestImplementation("org.junit.jupiter:junit-jupiter-params:latest.release")
|
||||||
|
compatTestImplementation(embeddedKotlin("reflect"))
|
||||||
compatTestImplementation(embeddedKotlin("stdlib-jdk8"))
|
compatTestImplementation(embeddedKotlin("stdlib-jdk8"))
|
||||||
compatTestImplementation(embeddedKotlin("test-junit5"))
|
compatTestImplementation(embeddedKotlin("test-junit5"))
|
||||||
compatTestImplementation(embeddedKotlin("reflect"))
|
|
||||||
compatTestImplementation("org.junit.jupiter:junit-jupiter-api:latest.release")
|
|
||||||
compatTestRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:latest.release")
|
|
||||||
compatTestImplementation("org.junit.jupiter:junit-jupiter-params:latest.release")
|
|
||||||
compatTestRuntimeOnly("org.junit.platform:junit-platform-launcher:latest.release")
|
|
||||||
compatTestImplementation("dev.minutest:minutest:latest.release")
|
|
||||||
compatTestImplementation(gradleTestKit())
|
compatTestImplementation(gradleTestKit())
|
||||||
compatTestImplementation(project(":model"))
|
compatTestImplementation(project(":model"))
|
||||||
compatTestImplementation("io.strikt:strikt-core:latest.release")
|
compatTestRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:latest.release")
|
||||||
compatTestImplementation("com.squareup.okio:okio:latest.release")
|
compatTestRuntimeOnly("org.junit.platform:junit-platform-launcher:latest.release")
|
||||||
compatTestImplementation("io.javalin:javalin:latest.release")
|
|
||||||
|
|
||||||
testImplementation("io.findify:s3mock_2.12:latest.release")
|
|
||||||
testImplementation("io.strikt:strikt-core:latest.release")
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-api:latest.release")
|
|
||||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:latest.release")
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-params:latest.release")
|
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher:latest.release")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
@@ -92,10 +84,11 @@ tasks {
|
|||||||
includeEngines("junit-jupiter")
|
includeEngines("junit-jupiter")
|
||||||
}
|
}
|
||||||
|
|
||||||
afterTest(KotlinClosure2<TestDescriptor, TestResult, Any>({ descriptor, result ->
|
// Default logging config exposes a classpath conflict between
|
||||||
// work around a bug in Gradle versions before 6.1, see https://github.com/junit-team/junit5/issues/2041
|
// the Gradle API and SFL4J.
|
||||||
val test = descriptor as org.gradle.api.internal.tasks.testing.TestDescriptorInternal
|
// (Sprint Boot is used in S3Mock)
|
||||||
println("[${test.classDisplayName}] > [${test.displayName}]: ${result.resultType}")
|
systemProperty("org.springframework.boot.logging.LoggingSystem", "org.springframework.boot.logging.java.JavaLoggingSystem")
|
||||||
}))
|
|
||||||
|
systemProperty("fixtures", "$rootDir/fixtures")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,113 +1,170 @@
|
|||||||
# 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.amazonaws:aws-java-sdk-core:1.11.294=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
ch.qos.logback:logback-classic:1.2.3=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.amazonaws:aws-java-sdk-kms:1.11.294=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
ch.qos.logback:logback-core:1.2.3=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.amazonaws:aws-java-sdk-s3:1.11.294=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.adobe.testing:s3mock-junit5:2.1.28=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.amazonaws:jmespath-java:1.11.294=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.adobe.testing:s3mock-testsupport-common:2.1.28=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.christophsturm:filepeek:0.1.2=compatTestRuntimeClasspath,testRuntimeClasspath
|
com.adobe.testing:s3mock:2.1.28=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.fasterxml.jackson.core:jackson-annotations:2.6.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.amazonaws:aws-java-sdk-core:1.11.488=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.fasterxml.jackson.core:jackson-core:2.6.7=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.amazonaws:aws-java-sdk-core:1.11.946=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.fasterxml.jackson.core:jackson-databind:2.6.7.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.amazonaws:aws-java-sdk-kms:1.11.488=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.amazonaws:aws-java-sdk-kms:1.11.946=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.github.pathikrit:better-files_2.12:3.9.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.amazonaws:aws-java-sdk-s3:1.11.488=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.google.guava:guava:21.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.amazonaws:aws-java-sdk-s3:1.11.946=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.amazonaws:jmespath-java:1.11.488=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.amazonaws:jmespath-java:1.11.946=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.christophsturm:filepeek:0.1.2=compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-annotations:2.6.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-annotations:2.9.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-core:2.9.9=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-databind:2.6.7.4=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.core:jackson-databind:2.9.9.3=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.6.7=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.9=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.9=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml.woodstox:woodstox-core:5.1.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
com.fasterxml:classmate:1.3.4=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.squareup.moshi:moshi:1.11.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.squareup.moshi:moshi:1.11.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.squareup.okio:okio-metadata:3.0.0-alpha.1=compatTestImplementationDependenciesMetadata
|
com.squareup.okio:okio-metadata:3.0.0-alpha.1=compatTestImplementationDependenciesMetadata
|
||||||
com.squareup.okio:okio:1.17.5=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.squareup.okio:okio:1.17.5=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.squareup.okio:okio:3.0.0-alpha.1=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
com.squareup.okio:okio:3.0.0-alpha.1=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.typesafe.akka:akka-actor_2.12:2.5.31=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.typesafe.netty:netty-reactive-streams-http:2.0.0=compatTestRuntimeClasspath
|
||||||
com.typesafe.akka:akka-http-core_2.12:10.1.12=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.typesafe.netty:netty-reactive-streams:2.0.0=compatTestRuntimeClasspath
|
||||||
com.typesafe.akka:akka-http_2.12:10.1.12=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
commons-codec:commons-codec:1.11=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.typesafe.akka:akka-parsing_2.12:10.1.12=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
commons-io:commons-io:2.6=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
com.typesafe.akka:akka-protobuf_2.12:2.5.31=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
commons-logging:commons-logging:1.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.typesafe.akka:akka-stream_2.12:2.5.31=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.typesafe.scala-logging:scala-logging_2.12:3.9.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.typesafe:config:1.3.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.typesafe:ssl-config-core_2.12:0.3.8=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
commons-codec:commons-codec:1.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
commons-logging:commons-logging:1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
dev.minutest:minutest:2.0.0-alpha=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
dev.minutest:minutest:2.0.0-alpha=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
io.findify:s3mock_2.12:0.2.6=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
io.github.classgraph:classgraph:4.8.28=compatTestRuntimeClasspath
|
io.github.classgraph:classgraph:4.8.28=compatTestRuntimeClasspath
|
||||||
io.javalin:javalin:3.13.3=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
io.javalin:javalin:3.13.3=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
io.strikt:strikt-core:0.28.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
io.netty:netty-buffer:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
javax.activation:javax.activation-api:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
io.netty:netty-codec-http2:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-codec-http:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-codec:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-common:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-handler:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-resolver:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-transport-native-epoll:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-transport-native-unix-common:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.netty:netty-transport:4.1.33.Final=compatTestRuntimeClasspath
|
||||||
|
io.strikt:strikt-core:0.28.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
javax.annotation:javax.annotation-api:1.3.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
javax.servlet:javax.servlet-api:3.1.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
javax.servlet:javax.servlet-api:3.1.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
javax.xml.bind:jaxb-api:2.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
javax.validation:validation-api:2.0.1.Final=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
joda-time:joda-time:2.8.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
joda-time:joda-time:2.8.1=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.swiftzer.semver:semver:1.1.1=compatTestRuntimeClasspath,default,runtimeClasspath,testRuntimeClasspath
|
net.swiftzer.semver:semver:1.1.1=compatTestRuntimeClasspath,default,runtimeClasspath,testRuntimeClasspath
|
||||||
org.apache.httpcomponents:httpclient:4.5.5=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.apache.commons:commons-lang3:3.8.1=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.apache.httpcomponents:httpcore:4.4.9=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.apache.httpcomponents:httpclient:4.5.13=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpclient:4.5.5=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata
|
||||||
|
org.apache.httpcomponents:httpclient:4.5.9=compatTestRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpcore:4.4.11=compatTestRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpcore:4.4.13=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.apache.httpcomponents:httpcore:4.4.9=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata
|
||||||
org.apache.ivy:ivy:2.5.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.apache.ivy:ivy:2.5.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.apache.logging.log4j:log4j-api:2.11.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.apache.logging.log4j:log4j-to-slf4j:2.11.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.apache.maven:maven-repository-metadata:3.6.3=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,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
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.codehaus.plexus:plexus-utils:3.2.1=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.codehaus.woodstox:stax2-api:4.1=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty.websocket:websocket-server:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty.websocket:websocket-server:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty.websocket:websocket-servlet:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty.websocket:websocket-servlet:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-client:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-client:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-continuation:9.4.19.v20190610=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-http:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-http:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-io:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-io:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-security:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-security:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-server:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-server:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-servlet:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-servlet:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-servlets:9.4.19.v20190610=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-util-ajax:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-util-ajax:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-util:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-util:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-webapp:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-webapp:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-xml:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.eclipse.jetty:jetty-xml:9.4.35.v20201120=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.gradle:gradle-tooling-api:6.8.1=compileClasspath,compileOnly,compileOnlyDependenciesMetadata
|
org.gradle:gradle-tooling-api:6.8.1=compileClasspath,compileOnly,compileOnlyDependenciesMetadata
|
||||||
org.iq80.leveldb:leveldb-api:0.12=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.hibernate.validator:hibernate-validator:6.0.17.Final=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.iq80.leveldb:leveldb:0.12=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jboss.logging:jboss-logging:3.3.2.Final=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20181211=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.intellij.deps:trove4j:1.0.20181211=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.20=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.20=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.4.20=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.4.20=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.4.20=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.4.20=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.4.20=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.4.20=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.4.20=kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.4.20=kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata
|
org.jetbrains.kotlin:kotlin-reflect:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.4.21-2=compatTestRuntimeClasspath,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-reflect:1.4.21-2=compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.4.20=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.4.20=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlin:kotlin-script-runtime:1.4.20=kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-script-runtime:1.4.20=kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-scripting-common:1.4.20=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlin:kotlin-scripting-common:1.4.20=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.4.20=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.4.20=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.4.20=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.4.20=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.4.20=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.4.20=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,default,embeddedKotlin,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.20=compileClasspath,compileOnly,compileOnlyDependenciesMetadata,default,embeddedKotlin,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:1.4.21-2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-test-annotations-common:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-test-annotations-common:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-test-common:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-test-common:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-test-junit5:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-test-junit5:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-test:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-test:1.4.20=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.2=compatTestRuntimeClasspath,testRuntimeClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.2=compatTestRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7=kotlinCompilerPluginClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7=kotlinCompilerPluginClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2=compatTestRuntimeClasspath,testRuntimeClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2=compatTestRuntimeClasspath
|
||||||
org.jetbrains:annotations:13.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,embeddedKotlin,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,default,embeddedKotlin,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspath,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-api:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-engine:5.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-params:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
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,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-commons:1.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.platform:junit-platform-engine:1.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-engine:1.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.platform:junit-platform-launcher:1.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-launcher:1.7.0=compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
|
||||||
org.junit:junit-bom:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit:junit-bom:5.7.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
|
||||||
org.opentest4j:opentest4j:1.2.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.mortbay.jasper:apache-el:8.5.40=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.reactivestreams:reactive-streams:1.0.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.2.0=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compatTestRuntimeOnlyDependenciesMetadata
|
||||||
org.scala-lang.modules:scala-collection-compat_2.12:2.1.6=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.reactivestreams:reactive-streams:1.0.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.scala-lang.modules:scala-java8-compat_2.12:0.8.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.slf4j:jul-to-slf4j:1.7.28=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
org.scala-lang.modules:scala-parser-combinators_2.12:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.scala-lang.modules:scala-xml_2.12:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.scala-lang:scala-library:2.12.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.scala-lang:scala-reflect:2.12.7=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.slf4j:slf4j-api:1.7.25=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.slf4j:slf4j-api:1.7.28=compileClasspath,compileOnly,compileOnlyDependenciesMetadata
|
org.slf4j:slf4j-api:1.7.28=compileClasspath,compileOnly,compileOnlyDependenciesMetadata
|
||||||
org.slf4j:slf4j-api:1.7.30=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
org.slf4j:slf4j-api:1.7.30=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
software.amazon.ion:ion-java:1.0.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.springframework.boot:spring-boot-autoconfigure:2.1.9.RELEASE=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
|
org.springframework.boot:spring-boot-starter-jetty:2.1.9.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-json:2.1.9.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-logging:2.1.9.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter-web:2.1.9.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot-starter:2.1.9.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework.boot:spring-boot:2.1.9.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-aop:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-beans:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-context:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-core:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-expression:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-jcl:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-web:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.springframework:spring-webmvc:5.1.10.RELEASE=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
org.yaml:snakeyaml:1.23=compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:annotations:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:apache-client:2.7.19=compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:auth:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-core:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-query-protocol:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:aws-xml-protocol:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:http-client-spi:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:netty-nio-client:2.7.19=compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:profiles:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:protocol-core:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:regions:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:s3:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:sdk-core:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:url-connection-client:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.awssdk:utils:2.7.19=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.eventstream:eventstream:1.0.1=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath
|
||||||
|
software.amazon.ion:ion-java:1.0.2=compatTestCompileClasspath,compatTestImplementationDependenciesMetadata,compatTestRuntimeClasspath,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
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
|
||||||
|
|||||||
52
plugin/src/compatTest/kotlin/org/nixos/gradle2nix/S3Test.kt
Normal file
52
plugin/src/compatTest/kotlin/org/nixos/gradle2nix/S3Test.kt
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import dev.minutest.Tests
|
||||||
|
import dev.minutest.junit.JUnit5Minutests
|
||||||
|
import dev.minutest.rootContext
|
||||||
|
import dev.minutest.test
|
||||||
|
import strikt.api.expectThat
|
||||||
|
import strikt.assertions.containsExactly
|
||||||
|
import strikt.assertions.flatMap
|
||||||
|
import strikt.assertions.map
|
||||||
|
|
||||||
|
class S3Test : JUnit5Minutests {
|
||||||
|
@Tests
|
||||||
|
fun tests() = rootContext("s3 tests") {
|
||||||
|
withBucket("repositories") {
|
||||||
|
withFixture("s3/maven") {
|
||||||
|
|
||||||
|
test("dependency from s3 maven repo") {
|
||||||
|
expectThat(build()) {
|
||||||
|
get("root project dependencies") { rootProject.projectDependencies }.and {
|
||||||
|
ids.containsExactly(
|
||||||
|
"org.apache:test:1.0.0@jar",
|
||||||
|
"org.apache:test:1.0.0@pom"
|
||||||
|
)
|
||||||
|
flatMap { it.urls }.containsExactly(
|
||||||
|
"s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.jar",
|
||||||
|
"s3://repositories/m2/org/apache/test/1.0.0/test-1.0.0.pom"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
withFixture("s3/maven-snapshot") {
|
||||||
|
test("snapshot dependency from s3 maven repo") {
|
||||||
|
expectThat(build()) {
|
||||||
|
get("root project dependencies") { rootProject.projectDependencies }.and {
|
||||||
|
ids.containsExactly(
|
||||||
|
"org.apache:test-SNAPSHOT1:2.0.0-SNAPSHOT@jar",
|
||||||
|
"org.apache:test-SNAPSHOT1:2.0.0-SNAPSHOT@pom"
|
||||||
|
)
|
||||||
|
flatMap { it.urls }.containsExactly(
|
||||||
|
"s3://repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.jar",
|
||||||
|
"s3://repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.pom"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
package org.nixos.gradle2nix
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import com.adobe.testing.s3mock.S3MockApplication
|
||||||
|
import com.adobe.testing.s3mock.junit5.S3MockExtension
|
||||||
|
import com.adobe.testing.s3mock.testsupport.common.S3MockStarter
|
||||||
import com.squareup.moshi.Moshi
|
import com.squareup.moshi.Moshi
|
||||||
import dev.minutest.ContextBuilder
|
import dev.minutest.ContextBuilder
|
||||||
import dev.minutest.MinutestFixture
|
import dev.minutest.MinutestFixture
|
||||||
@@ -13,6 +16,7 @@ import dev.minutest.given
|
|||||||
import dev.minutest.givenClosable
|
import dev.minutest.givenClosable
|
||||||
import dev.minutest.given_
|
import dev.minutest.given_
|
||||||
import io.javalin.Javalin
|
import io.javalin.Javalin
|
||||||
|
import io.javalin.http.staticfiles.Location
|
||||||
import okio.buffer
|
import okio.buffer
|
||||||
import okio.source
|
import okio.source
|
||||||
import org.gradle.internal.classpath.DefaultClassPath
|
import org.gradle.internal.classpath.DefaultClassPath
|
||||||
@@ -25,10 +29,12 @@ import strikt.assertions.map
|
|||||||
import java.io.Closeable
|
import java.io.Closeable
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.StringWriter
|
import java.io.StringWriter
|
||||||
import java.nio.file.Paths
|
import java.util.concurrent.atomic.AtomicBoolean
|
||||||
|
|
||||||
private val moshi = Moshi.Builder().build()
|
private val moshi = Moshi.Builder().build()
|
||||||
|
|
||||||
|
val fixtureRoot = File(System.getProperty("fixtures"))
|
||||||
|
|
||||||
val gradleVersion = System.getProperty("compat.gradle.version")
|
val gradleVersion = System.getProperty("compat.gradle.version")
|
||||||
?.let(GradleVersion::version)
|
?.let(GradleVersion::version)
|
||||||
?: GradleVersion.current()
|
?: GradleVersion.current()
|
||||||
@@ -69,7 +75,8 @@ fun File.buildKotlin(
|
|||||||
|
|
||||||
private fun File.build(
|
private fun File.build(
|
||||||
configurations: List<String>,
|
configurations: List<String>,
|
||||||
subprojects: List<String>
|
subprojects: List<String>,
|
||||||
|
extraArguments: List<String> = emptyList()
|
||||||
): DefaultBuild {
|
): DefaultBuild {
|
||||||
val log = StringWriter()
|
val log = StringWriter()
|
||||||
|
|
||||||
@@ -83,7 +90,8 @@ private fun File.build(
|
|||||||
"--init-script=${initscript()}",
|
"--init-script=${initscript()}",
|
||||||
"--stacktrace",
|
"--stacktrace",
|
||||||
"-Porg.nixos.gradle2nix.configurations=${configurations.joinToString(",")}",
|
"-Porg.nixos.gradle2nix.configurations=${configurations.joinToString(",")}",
|
||||||
"-Porg.nixos.gradle2nix.subprojects=${subprojects.joinToString(",")}"
|
"-Porg.nixos.gradle2nix.subprojects=${subprojects.joinToString(",")}",
|
||||||
|
*(extraArguments.toTypedArray())
|
||||||
)
|
)
|
||||||
.runCatching { build() }
|
.runCatching { build() }
|
||||||
|
|
||||||
@@ -107,15 +115,64 @@ val <T : Iterable<Artifact>> Assertion.Builder<T>.ids: Assertion.Builder<Iterabl
|
|||||||
|
|
||||||
private fun File.parents() = generateSequence(parentFile) { it.parentFile }
|
private fun File.parents() = generateSequence(parentFile) { it.parentFile }
|
||||||
|
|
||||||
|
abstract class ArgumentsSupplier(private val parent: ArgumentsSupplier? = null) {
|
||||||
|
open val arguments: List<String> = emptyList()
|
||||||
|
|
||||||
|
val extraArguments: List<String> get() = (parent?.extraArguments ?: emptyList()) + arguments
|
||||||
|
}
|
||||||
|
|
||||||
@MinutestFixture
|
@MinutestFixture
|
||||||
class RepositoryFixture(private val server: Javalin) : Closeable {
|
class RepositoryFixture(
|
||||||
|
private val server: Javalin,
|
||||||
|
parent: ArgumentsSupplier? = null
|
||||||
|
) : ArgumentsSupplier(parent), Closeable {
|
||||||
override fun close() {
|
override fun close() {
|
||||||
server.stop()
|
server.stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@MinutestFixture
|
@MinutestFixture
|
||||||
class TestFixture(val name: String, val source: File) : Closeable {
|
class S3Fixture(
|
||||||
|
private val name: String,
|
||||||
|
parent: ArgumentsSupplier? = null
|
||||||
|
) : ArgumentsSupplier(parent), Closeable {
|
||||||
|
private val s3mock = S3Mock(
|
||||||
|
initialBuckets = listOf(name),
|
||||||
|
secureConnection = false
|
||||||
|
)
|
||||||
|
|
||||||
|
override val arguments: List<String> get() = listOf(
|
||||||
|
"-Dorg.gradle.s3.endpoint=${s3mock.serviceEndpoint}",
|
||||||
|
"-Dorg.nixos.gradle2nix.s3test=true"
|
||||||
|
)
|
||||||
|
|
||||||
|
init {
|
||||||
|
s3mock.startServer()
|
||||||
|
|
||||||
|
val s3root = fixtureRoot.resolve(name)
|
||||||
|
val s3client = s3mock.createS3Client()
|
||||||
|
require(s3root.exists() && s3root.isDirectory) {
|
||||||
|
"$name: S3 fixture not found: $s3root"
|
||||||
|
}
|
||||||
|
s3root.walkTopDown()
|
||||||
|
.filter { it.isFile }
|
||||||
|
.forEach { file ->
|
||||||
|
val key = file.toRelativeString(s3root)
|
||||||
|
s3client.putObject(name, key, file)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun close() {
|
||||||
|
s3mock.stopServer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@MinutestFixture
|
||||||
|
class TestFixture(
|
||||||
|
val name: String,
|
||||||
|
val source: File,
|
||||||
|
parent: ArgumentsSupplier? = null
|
||||||
|
) : ArgumentsSupplier(parent), Closeable {
|
||||||
val dest: File
|
val dest: File
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@@ -131,7 +188,10 @@ class TestFixture(val name: String, val source: File) : Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@MinutestFixture
|
@MinutestFixture
|
||||||
class ProjectFixture(private val parent: TestFixture, private val source: File) : Closeable {
|
data class ProjectFixture(
|
||||||
|
private val parent: TestFixture,
|
||||||
|
private val source: File
|
||||||
|
) : Closeable {
|
||||||
private val dest: File
|
private val dest: File
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@@ -142,30 +202,48 @@ class ProjectFixture(private val parent: TestFixture, private val source: File)
|
|||||||
dest = parent.dest.resolve(rel)
|
dest = parent.dest.resolve(rel)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun copy() {
|
fun copySource() {
|
||||||
source.copyRecursively(dest, true)
|
source.copyRecursively(dest, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun build(
|
fun build(
|
||||||
configurations: List<String> = emptyList(),
|
configurations: List<String> = emptyList(),
|
||||||
subprojects: List<String> = emptyList()
|
subprojects: List<String> = emptyList()
|
||||||
) = dest.build(configurations, subprojects)
|
) = dest.build(configurations, subprojects, parent.extraArguments)
|
||||||
|
|
||||||
override fun close() {
|
override fun close() {
|
||||||
dest.deleteRecursively()
|
dest.deleteRecursively()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun ContextBuilder<*>.withBucket(
|
||||||
|
name: String,
|
||||||
|
block: TestContextBuilder<*, S3Fixture>.() -> Unit
|
||||||
|
) = derivedContext<S3Fixture>("with s3 bucket: $name") {
|
||||||
|
given_ { parent ->
|
||||||
|
S3Fixture(name, parent as? ArgumentsSupplier)
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEach { it.close() }
|
||||||
|
|
||||||
|
block()
|
||||||
|
}
|
||||||
|
|
||||||
fun ContextBuilder<*>.withRepository(
|
fun ContextBuilder<*>.withRepository(
|
||||||
name: String,
|
name: String,
|
||||||
block: TestContextBuilder<*, RepositoryFixture>.() -> Unit
|
block: TestContextBuilder<*, RepositoryFixture>.() -> Unit
|
||||||
) = derivedContext<RepositoryFixture>("with repository: $name") {
|
) = derivedContext<RepositoryFixture>("with repository: $name") {
|
||||||
givenClosable {
|
given_ { parent ->
|
||||||
RepositoryFixture(Javalin.create { config ->
|
RepositoryFixture(
|
||||||
config.addStaticFiles("/repositories/$name")
|
server = Javalin.create { config ->
|
||||||
}.start(9999))
|
config.addStaticFiles("${fixtureRoot}/repositories/$name", Location.EXTERNAL)
|
||||||
|
}.start(9999),
|
||||||
|
parent = parent as? ArgumentsSupplier
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
afterEach { it.close() }
|
||||||
|
|
||||||
block()
|
block()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,24 +251,50 @@ fun ContextBuilder<*>.withFixture(
|
|||||||
name: String,
|
name: String,
|
||||||
block: TestContextBuilder<*, ProjectFixture>.() -> Unit
|
block: TestContextBuilder<*, ProjectFixture>.() -> Unit
|
||||||
) = derivedContext<TestFixture>(name) {
|
) = derivedContext<TestFixture>(name) {
|
||||||
val url = checkNotNull(Thread.currentThread().contextClassLoader.getResource(name)?.toURI()) {
|
|
||||||
"$name: No test fixture found"
|
val projectRoot = fixtureRoot.resolve(name).also {
|
||||||
|
check(it.exists()) { "$name: project fixture not found: $it" }
|
||||||
}
|
}
|
||||||
val fixtureRoot = Paths.get(url).toFile().absoluteFile
|
|
||||||
|
|
||||||
given { TestFixture(name, fixtureRoot) }
|
given_ { parent ->
|
||||||
|
TestFixture(name, projectRoot, parent as? ArgumentsSupplier)
|
||||||
|
}
|
||||||
|
|
||||||
val testRoots = fixtureRoot.listFiles()!!
|
val testRoots = projectRoot.listFiles()!!
|
||||||
.filter { it.isDirectory }
|
.filter { it.isDirectory }
|
||||||
.map { it.absoluteFile }
|
.map { it.absoluteFile }
|
||||||
.toList()
|
.toList()
|
||||||
|
|
||||||
testRoots.forEach { testRoot ->
|
testRoots.forEach { testRoot ->
|
||||||
derivedContext<ProjectFixture>(testRoot.name) {
|
derivedContext<ProjectFixture>(testRoot.name) {
|
||||||
given_ { ProjectFixture(it, testRoot) }
|
given_ { parent -> ProjectFixture(parent, testRoot) }
|
||||||
beforeEach { copy() }
|
beforeEach { copySource() }
|
||||||
afterEach { close() }
|
afterEach { close() }
|
||||||
block()
|
block()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class S3Mock(
|
||||||
|
initialBuckets: List<String> = emptyList(),
|
||||||
|
secureConnection: Boolean = true
|
||||||
|
) : S3MockStarter(
|
||||||
|
mapOf(
|
||||||
|
S3MockApplication.PROP_INITIAL_BUCKETS to initialBuckets.joinToString(","),
|
||||||
|
S3MockApplication.PROP_SECURE_CONNECTION to secureConnection
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
private val running = AtomicBoolean()
|
||||||
|
|
||||||
|
fun startServer() {
|
||||||
|
if (running.compareAndSet(false, true)) {
|
||||||
|
start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun stopServer() {
|
||||||
|
if (running.compareAndSet(true, false)) {
|
||||||
|
stop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nixos.gradle2nix
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
import dev.minutest.Tests
|
import dev.minutest.Tests
|
||||||
|
import dev.minutest.given
|
||||||
import dev.minutest.junit.JUnit5Minutests
|
import dev.minutest.junit.JUnit5Minutests
|
||||||
import dev.minutest.rootContext
|
import dev.minutest.rootContext
|
||||||
import dev.minutest.test
|
import dev.minutest.test
|
||||||
@@ -11,7 +12,7 @@ import java.io.File
|
|||||||
class WrapperTest : JUnit5Minutests {
|
class WrapperTest : JUnit5Minutests {
|
||||||
@Tests
|
@Tests
|
||||||
fun tests() = rootContext<File>("wrapper tests") {
|
fun tests() = rootContext<File>("wrapper tests") {
|
||||||
fixture { createTempDir("gradle2nix") }
|
given { createTempDir("gradle2nix") }
|
||||||
|
|
||||||
test("resolves gradle wrapper version") {
|
test("resolves gradle wrapper version") {
|
||||||
expectThat(buildKotlin("""
|
expectThat(buildKotlin("""
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ internal class ConfigurationResolver(
|
|||||||
private val resolvers: List<RepositoryResolver>,
|
private val resolvers: List<RepositoryResolver>,
|
||||||
private val dependencies: DependencyHandler
|
private val dependencies: DependencyHandler
|
||||||
) {
|
) {
|
||||||
private val failed = mutableListOf<ArtifactIdentifier>()
|
private val failed = mutableSetOf<ArtifactIdentifier>()
|
||||||
private val ivy = Ivy.newInstance(ivySettings)
|
private val ivy = Ivy.newInstance(ivySettings)
|
||||||
|
|
||||||
val unresolved: List<ArtifactIdentifier> = failed.toList()
|
val unresolved: List<ArtifactIdentifier> = failed.toList()
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.nixos.gradle2nix
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
|
import com.amazonaws.auth.BasicAWSCredentials
|
||||||
|
import com.amazonaws.auth.BasicSessionCredentials
|
||||||
import org.apache.ivy.core.LogOptions
|
import org.apache.ivy.core.LogOptions
|
||||||
import org.apache.ivy.core.cache.ArtifactOrigin
|
import org.apache.ivy.core.cache.ArtifactOrigin
|
||||||
import org.apache.ivy.core.cache.CacheResourceOptions
|
import org.apache.ivy.core.cache.CacheResourceOptions
|
||||||
@@ -11,6 +13,7 @@ import org.apache.ivy.core.resolve.DownloadOptions
|
|||||||
import org.apache.ivy.core.settings.IvySettings
|
import org.apache.ivy.core.settings.IvySettings
|
||||||
import org.apache.ivy.core.settings.TimeoutConstraint
|
import org.apache.ivy.core.settings.TimeoutConstraint
|
||||||
import org.apache.ivy.plugins.repository.Repository
|
import org.apache.ivy.plugins.repository.Repository
|
||||||
|
import org.apache.ivy.plugins.repository.Resource
|
||||||
import org.apache.ivy.plugins.repository.url.URLRepository
|
import org.apache.ivy.plugins.repository.url.URLRepository
|
||||||
import org.apache.ivy.plugins.repository.url.URLResource
|
import org.apache.ivy.plugins.repository.url.URLResource
|
||||||
import org.apache.ivy.plugins.resolver.AbstractResolver
|
import org.apache.ivy.plugins.resolver.AbstractResolver
|
||||||
@@ -33,6 +36,7 @@ import org.gradle.api.logging.Logger
|
|||||||
import org.gradle.api.logging.Logging
|
import org.gradle.api.logging.Logging
|
||||||
import org.gradle.authentication.aws.AwsImAuthentication
|
import org.gradle.authentication.aws.AwsImAuthentication
|
||||||
import org.gradle.internal.authentication.AllSchemesAuthentication
|
import org.gradle.internal.authentication.AllSchemesAuthentication
|
||||||
|
import org.gradle.kotlin.dsl.getCredentials
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import org.apache.ivy.core.module.descriptor.Artifact as IvyArtifact
|
import org.apache.ivy.core.module.descriptor.Artifact as IvyArtifact
|
||||||
@@ -82,8 +86,18 @@ internal class MavenResolver(
|
|||||||
|
|
||||||
override fun resolve(artifactId: DefaultArtifactIdentifier, sha256: String?): DefaultArtifact? {
|
override fun resolve(artifactId: DefaultArtifactIdentifier, sha256: String?): DefaultArtifact? {
|
||||||
val ivyArtifact: IvyArtifact = artifactId.toArtifact()
|
val ivyArtifact: IvyArtifact = artifactId.toArtifact()
|
||||||
val origin = ivyResolver.locate(ivyArtifact)?.takeIf(ArtifactOrigin::isExists) ?: return null
|
val origin = ivyResolver.locate(ivyArtifact)
|
||||||
val hash = sha256 ?: ivyResolver.download(origin, downloadOptions).localFile?.sha256() ?: return null
|
if (origin == null || !origin.isExists) return null
|
||||||
|
val hash = if (sha256 != null) sha256 else {
|
||||||
|
val report = ivyResolver.download(origin, downloadOptions)
|
||||||
|
report.localFile?.sha256().also {
|
||||||
|
if (it == null) log.error(report.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hash == null) {
|
||||||
|
log.error("Failed to download '$artifactId' from repository '${ivyResolver.repository.name}'")
|
||||||
|
return null
|
||||||
|
}
|
||||||
val snapshotVersion: SnapshotVersion? = artifactId.version.snapshotVersion()?.let {
|
val snapshotVersion: SnapshotVersion? = artifactId.version.snapshotVersion()?.let {
|
||||||
findSnapshotVersion(artifactId, it)
|
findSnapshotVersion(artifactId, it)
|
||||||
}
|
}
|
||||||
@@ -103,9 +117,9 @@ internal class MavenResolver(
|
|||||||
snapshotVersion: SnapshotVersion
|
snapshotVersion: SnapshotVersion
|
||||||
): SnapshotVersion {
|
): SnapshotVersion {
|
||||||
if (snapshotVersion.timestamp != null) return snapshotVersion
|
if (snapshotVersion.timestamp != null) return snapshotVersion
|
||||||
val metadataLocation = "${ivyResolver.root}${artifactId.repoPath()}/maven-metadata.xml".toUrl()
|
val metadataLocation = "${ivyResolver.root}${artifactId.repoPath()}/maven-metadata.xml"
|
||||||
val metadataFile = ivyResolver.repositoryCacheManager.downloadRepositoryResource(
|
val metadataFile = ivyResolver.repositoryCacheManager.downloadRepositoryResource(
|
||||||
URLResource(metadataLocation, ivyResolver.timeoutConstraint),
|
ivyResolver.repository.getResource(metadataLocation),
|
||||||
"maven-metadata",
|
"maven-metadata",
|
||||||
"maven-metadata",
|
"maven-metadata",
|
||||||
"xml",
|
"xml",
|
||||||
@@ -160,7 +174,16 @@ internal class IvyResolver(
|
|||||||
override fun resolve(artifactId: DefaultArtifactIdentifier, sha256: String?): DefaultArtifact? {
|
override fun resolve(artifactId: DefaultArtifactIdentifier, sha256: String?): DefaultArtifact? {
|
||||||
val ivyArtifact: IvyArtifact = artifactId.toArtifact()
|
val ivyArtifact: IvyArtifact = artifactId.toArtifact()
|
||||||
val origin = ivyResolver.locate(ivyArtifact)?.takeIf(ArtifactOrigin::isExists) ?: return null
|
val origin = ivyResolver.locate(ivyArtifact)?.takeIf(ArtifactOrigin::isExists) ?: return null
|
||||||
val hash = sha256 ?: ivyResolver.download(origin, downloadOptions).localFile?.sha256() ?: return null
|
val hash = if (sha256 != null) sha256 else {
|
||||||
|
val report = ivyResolver.download(origin, downloadOptions)
|
||||||
|
report.localFile?.sha256().also {
|
||||||
|
if (it == null) log.error(report.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hash == null) {
|
||||||
|
log.error("Failed to download '$artifactId' from repository '${ivyResolver.repository.name}'")
|
||||||
|
return null
|
||||||
|
}
|
||||||
return DefaultArtifact(
|
return DefaultArtifact(
|
||||||
id = DefaultArtifactIdentifier(artifactId),
|
id = DefaultArtifactIdentifier(artifactId),
|
||||||
name = artifactId.filename(null),
|
name = artifactId.filename(null),
|
||||||
@@ -180,7 +203,9 @@ private fun cacheManager(
|
|||||||
return DefaultRepositoryCacheManager(
|
return DefaultRepositoryCacheManager(
|
||||||
"${scope.name.toLowerCase()}-${repository.name}-cache",
|
"${scope.name.toLowerCase()}-${repository.name}-cache",
|
||||||
ivySettings,
|
ivySettings,
|
||||||
project.buildDir.resolve("tmp/gradle2nix/${scope.name.toLowerCase()}/${repository.name}")
|
project.buildDir.resolve("tmp/gradle2nix/${repository.name}").also {
|
||||||
|
it.mkdirs()
|
||||||
|
}
|
||||||
).also {
|
).also {
|
||||||
ivySettings.addRepositoryCacheManager(it)
|
ivySettings.addRepositoryCacheManager(it)
|
||||||
}
|
}
|
||||||
@@ -236,31 +261,42 @@ private fun ArtifactIdentifier.filename(
|
|||||||
append(".", extension)
|
append(".", extension)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val downloadOptions = DownloadOptions().apply { log = LogOptions.LOG_QUIET }
|
private val downloadOptions = DownloadOptions().apply {
|
||||||
|
log = LogOptions.LOG_DEFAULT
|
||||||
|
}
|
||||||
|
|
||||||
private fun <T> AbstractResolver.resolverRepository(
|
private fun <T> AbstractResolver.resolverRepository(
|
||||||
repository: T
|
repository: T
|
||||||
) : Repository
|
) : Repository
|
||||||
where T : UrlArtifactRepository,
|
where T : ArtifactRepository,
|
||||||
T : AuthenticationSupported =
|
T : AuthenticationSupported =
|
||||||
when (val scheme = repository.url.scheme) {
|
when (val scheme = repository.url.scheme) {
|
||||||
"s3" -> s3Repository(repository.authentication, LazyTimeoutConstraint(this))
|
"s3" -> s3Repository(
|
||||||
|
repository.getCredentials(AwsCredentials::class),
|
||||||
|
LazyTimeoutConstraint(this)
|
||||||
|
)
|
||||||
"http", "https" -> URLRepository(LazyTimeoutConstraint(this))
|
"http", "https" -> URLRepository(LazyTimeoutConstraint(this))
|
||||||
else -> throw IllegalStateException("Unknown repository URL scheme: $scheme")
|
else -> throw IllegalStateException("Unknown repository URL scheme: $scheme")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun s3Repository(
|
private fun s3Repository(
|
||||||
authContainer: AuthenticationContainer,
|
credentials: AwsCredentials?,
|
||||||
timeoutConstraint: TimeoutConstraint
|
timeoutConstraint: TimeoutConstraint
|
||||||
): Repository {
|
): Repository {
|
||||||
val auth = authContainer.firstOrNull { auth ->
|
val awsCredentials = credentials?.let {
|
||||||
auth is AllSchemesAuthentication || auth is AwsImAuthentication
|
if (it.sessionToken == null) {
|
||||||
|
BasicAWSCredentials(it.accessKey, it.secretKey)
|
||||||
|
} else {
|
||||||
|
BasicSessionCredentials(it.accessKey, it.secretKey, it.sessionToken)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
checkNotNull(auth) { "S3 resource should either specify AwsImAuthentication or provide some AwsCredentials." }
|
|
||||||
return S3Repository(
|
return S3Repository(
|
||||||
credentials = (auth as? AllSchemesAuthentication)?.credentials as? AwsCredentials,
|
credentials = awsCredentials,
|
||||||
endpoint = System.getProperty("org.gradle.s3.endpoint")?.let { URI(it) }
|
endpoint = System.getProperty("org.gradle.s3.endpoint")?.let { URI(it) },
|
||||||
)
|
timeoutConstraint = timeoutConstraint
|
||||||
|
).apply {
|
||||||
|
name = "AWS S3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LazyTimeoutConstraint(
|
private class LazyTimeoutConstraint(
|
||||||
@@ -272,3 +308,10 @@ private class LazyTimeoutConstraint(
|
|||||||
override fun getReadTimeout(): Int =
|
override fun getReadTimeout(): Int =
|
||||||
resolver.timeoutConstraint?.readTimeout ?: -1
|
resolver.timeoutConstraint?.readTimeout ?: -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compatibility shim as UrlArtifactRepository was added in Gradle 6.0
|
||||||
|
private val ArtifactRepository.url: URI get() = when (this) {
|
||||||
|
is MavenArtifactRepository -> url
|
||||||
|
is IvyArtifactRepository -> url
|
||||||
|
else -> throw IllegalStateException("Unhandled repository type: ${this::class.simpleName}")
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nixos.gradle2nix
|
package org.nixos.gradle2nix
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
import java.net.URI
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
|
|
||||||
@@ -19,3 +20,5 @@ private fun ByteArray.sha256() = buildString {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal fun String.toUrl(): URL = URL(this)
|
internal fun String.toUrl(): URL = URL(this)
|
||||||
|
|
||||||
|
internal fun String.toUri(): URI = URI(this)
|
||||||
|
|||||||
@@ -31,12 +31,6 @@ dependencyResolutionManagement {
|
|||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url = uri("https://repo.gradle.org/gradle/libs-releases") }
|
maven { url = uri("https://repo.gradle.org/gradle/libs-releases") }
|
||||||
maven {
|
|
||||||
url = uri("https://dl.bintray.com/ohnosequences/maven")
|
|
||||||
content {
|
|
||||||
includeGroup("ohnosequences")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||||
}
|
}
|
||||||
@@ -47,4 +41,4 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include(":app", ":model", ":plugin")
|
include(":app", ":ivy", ":model", ":plugin")
|
||||||
|
|||||||
Reference in New Issue
Block a user