From e522dda922e1fbf9017b7d327c20aace3c7f3186 Mon Sep 17 00:00:00 2001 From: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:48:44 -0500 Subject: [PATCH] move task from main gradle to config --- build.gradle | 13 ------------- shared/config.gradle | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 905d17f718..fdf2fa70cb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,4 @@ plugins { - id "java" id "com.diffplug.spotless" version "6.22.0" id "edu.wpi.first.NativeUtils" version "2024.2.0" apply false id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2" @@ -40,18 +39,6 @@ ext { println("Building for platform " + jniPlatform) } -def outputsFolder = file("$buildDir/allOutputs") - -task copyAllOutputs(type: Copy) { - destinationDir outputsFolder -} - -ext.addTaskToCopyAllOutputs = { task -> - copyAllOutputs.dependsOn task - copyAllOutputs.inputs.file task.archiveFile - copyAllOutputs.from task.archiveFile -} - wpilibTools.deps.wpilibVersion = wpilibVersion // Tell gradlerio what version of things to use (that we care about) diff --git a/shared/config.gradle b/shared/config.gradle index 798476a46d..34fb339fd3 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -36,6 +36,18 @@ model { } } +def outputsFolder = file("$buildDir/allOutputs") + +task copyAllOutputs(type: Copy) { + destinationDir outputsFolder +} + +ext.addTaskToCopyAllOutputs = { task -> + copyAllOutputs.dependsOn task + copyAllOutputs.inputs.file task.archiveFile + copyAllOutputs.from task.archiveFile +} + // Add debug path to binaries. ext.appendDebugPathToBinaries = { binaries -> binaries.withType(StaticLibraryBinarySpec) {