mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-11 15:30:38 -05:00
Use custom dependency resolution
- Use Apache Ivy to resolve artifact URLs - Update build model with full artifact IDs - Generate Maven module metadata to support dynamic version constraints - Resolve snapshot versions and generate snapshot metadata - Add test fixtures and rewrite Gradle plugin tests - Update dependencies
This commit is contained in:
13
fixtures/basic/basic-java-project/groovy/build.gradle
Normal file
13
fixtures/basic/basic-java-project/groovy/build.gradle
Normal file
@@ -0,0 +1,13 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.squareup.okio:okio:2.2.2'
|
||||
implementation 'com.squareup.moshi:moshi:1.8.0'
|
||||
}
|
||||
13
fixtures/basic/basic-java-project/kotlin/build.gradle.kts
Normal file
13
fixtures/basic/basic-java-project/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,13 @@
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.squareup.okio:okio:2.2.2")
|
||||
implementation("com.squareup.moshi:moshi:1.8.0")
|
||||
}
|
||||
11
fixtures/dependency/classifier/groovy/build.gradle
Normal file
11
fixtures/dependency/classifier/groovy/build.gradle
Normal file
@@ -0,0 +1,11 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.badlogicgames.gdx:gdx-platform:1.9.9:natives-desktop'
|
||||
}
|
||||
11
fixtures/dependency/classifier/kotlin/build.gradle.kts
Normal file
11
fixtures/dependency/classifier/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,11 @@
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.badlogicgames.gdx:gdx-platform:1.9.9:natives-desktop")
|
||||
}
|
||||
12
fixtures/dependency/dynamic-snapshot/groovy/build.gradle
Normal file
12
fixtures/dependency/dynamic-snapshot/groovy/build.gradle
Normal file
@@ -0,0 +1,12 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.anuken:packr:-SNAPSHOT'
|
||||
}
|
||||
12
fixtures/dependency/snapshot/groovy/build.gradle
Normal file
12
fixtures/dependency/snapshot/groovy/build.gradle
Normal file
@@ -0,0 +1,12 @@
|
||||
plugins {
|
||||
id "java"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.squareup.okio:okio:2.5.0-SNAPSHOT"
|
||||
}
|
||||
12
fixtures/dependency/snapshot/kotlin/build.gradle.kts
Normal file
12
fixtures/dependency/snapshot/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,12 @@
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"implementation"("com.squareup.okio:okio:2.5.0-SNAPSHOT")
|
||||
}
|
||||
20
fixtures/ivy/basic/kotlin/build.gradle.kts
Normal file
20
fixtures/ivy/basic/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,20 @@
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
repositories {
|
||||
ivy {
|
||||
url = uri("https://asset.opendof.org")
|
||||
layout("pattern") {
|
||||
this as IvyPatternRepositoryLayout
|
||||
ivy("ivy2/[organisation]/[module]/[revision]/ivy(.[platform]).xml")
|
||||
artifact("artifact/[organisation]/[module]/[revision](/[platform])(/[type]s)/[artifact]-[revision](-[classifier]).[ext]")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
dependencies {
|
||||
implementation("org.opendof.core-java:dof-cipher-sms4:1.0")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm" version "1.3.50"
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
plugins {
|
||||
kotlin("jvm") version "1.3.50"
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
}
|
||||
|
||||
project(':child-a') {
|
||||
dependencies {
|
||||
implementation project(':child-b')
|
||||
}
|
||||
}
|
||||
|
||||
project(':child-b') {
|
||||
dependencies {
|
||||
implementation project(':child-c')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
include ':child-a', ':child-b', ':child-c', ':child-d'
|
||||
13
fixtures/subprojects/multi-module/groovy/build.gradle
Normal file
13
fixtures/subprojects/multi-module/groovy/build.gradle
Normal file
@@ -0,0 +1,13 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.squareup.okio:okio:2.2.2'
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':child-a')
|
||||
implementation 'com.squareup.moshi:moshi:1.8.0'
|
||||
}
|
||||
1
fixtures/subprojects/multi-module/groovy/settings.gradle
Normal file
1
fixtures/subprojects/multi-module/groovy/settings.gradle
Normal file
@@ -0,0 +1 @@
|
||||
include ':child-a', ':child-b'
|
||||
13
fixtures/subprojects/multi-module/kotlin/build.gradle.kts
Normal file
13
fixtures/subprojects/multi-module/kotlin/build.gradle.kts
Normal file
@@ -0,0 +1,13 @@
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("junit:junit:4.12")
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.squareup.okio:okio:2.2.2")
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":child-a"))
|
||||
implementation("com.squareup.moshi:moshi:1.8.0")
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
include(":child-a", ":child-b")
|
||||
Reference in New Issue
Block a user