Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Add support for Gradle 8
Browse files Browse the repository at this point in the history
Signed-off-by: Eamonn Mansour <[email protected]>
  • Loading branch information
eamansour committed Aug 1, 2024
1 parent 63d8731 commit 4a7452b
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions dependency-download/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ repositories {
}

dependencies {
runtime group: 'dev.galasa', name: 'dev.galasa.managers.manifest', version: version, ext: "yaml"
runtime group: 'dev.galasa', name: 'dev.galasa.framework.manifest', version: version, ext: "yaml"
runtimeOnly group: 'dev.galasa', name: 'dev.galasa.managers.manifest', version: version, ext: "yaml"
runtimeOnly group: 'dev.galasa', name: 'dev.galasa.framework.manifest', version: version, ext: "yaml"
}

// Download all the files we depend upon.
Expand All @@ -31,19 +31,29 @@ task downloadAllDependencies(type: Copy) {
}

// Gets the manager dependency and renames it to remove the version number.
task getManagerDependency(type: Copy) {
from 'build/dependencies'
include "dev.galasa.managers.manifest-${version}.yaml"
destinationDir file('build/dependencies/')
rename "dev.galasa.managers.manifest-${version}.yaml", "dev.galasa.managers.manifest.yaml"
task getManagerDependency {
dependsOn downloadAllDependencies
doFirst {
copyDependency("dev.galasa.managers.manifest-${version}.yaml", "dev.galasa.managers.manifest.yaml")
}
}

// Gets the framework dependency and renames it to remove the version number.
task getFrameworkDependency(type: Copy) {
from 'build/dependencies'
include "dev.galasa.framework.manifest-${version}.yaml"
destinationDir file('build/dependencies/')
rename "dev.galasa.framework.manifest-${version}.yaml", "dev.galasa.framework.manifest.yaml"
task getFrameworkDependency {
dependsOn downloadAllDependencies
doFirst {
copyDependency("dev.galasa.framework.manifest-${version}.yaml", "dev.galasa.framework.manifest.yaml")
}
}

// Creates a copy of a dependency matching the given pattern and renames it with the given name
def copyDependency(dependencyPattern, desiredFileName) {
copy {
from 'build/dependencies'
include dependencyPattern
into file('build/dependencies/')
rename dependencyPattern, desiredFileName
}
}

// Gets all the dependencies
Expand Down

0 comments on commit 4a7452b

Please sign in to comment.