-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (76 loc) · 3.17 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import org.gradle.internal.os.OperatingSystem
plugins {
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '1.6'
id "com.ullink.nuget" version "2.15"
}
allprojects {
repositories {
mavenCentral()
}
}
if (!hasProperty('releaseType')) {
WPILibVersion {
releaseType = 'dev'
}
}
def buildVersion = project.hasProperty('buildVersion') ? project.buildVersion : '1.0.0'
def buildType = project.hasProperty('buildType') ? project.buildType : ''
def buildNumber = project.hasProperty('buildNumber') ? project.buildNumber : ''
apply from: "locations.gradle"
apply from: "properties.gradle"
apply from: "dependencies.gradle"
defineWpiUtilProperties()
defineHALProperties()
//defineNetworkTablesProperties()
defineCsCoreProperties()
defineCvProperties()
nugetSpec {
nuspec = [
metadata: [
id: 'FRC.WPILibNativeLibraries',
title: 'FRC WPILibNativeLibraries',
authors: 'RobotDotNet',
owners: 'RobotDotNet',
description: 'Contains the roboRIO libraries to run WPILib in C#',
tags: 'WPILib FIRST FRC RoboRIO',
copyright: '2016-2017',
projectUrl: 'https://github.com/robotdotnet/WPILib/WPILibNativeLibraries',
version: buildVersion + buildType + buildNumber,
contentFiles: [
{ files (include: '**/wpinative/*.*', buildAction: 'None', copyToOutput: 'true')}
],
],
files: [
{ file (src: wpiUtilSharedLib, target: 'contentfiles\\any\\any\\wpinative') },
{ file (src: halSharedLib, target: 'contentfiles\\any\\any\\wpinative') },
//{ file (src: netSharedLib, target: 'contentfiles\\any\\any\\wpinative') },
{ file (src: cscoreSharedLib, target: 'contentfiles\\any\\any\\wpinative') },
{ file (src: "${rootDir}/temp/cvsharp/build/libs/openCvSharpExtern/shared/libOpenCvSharpExtern.so", target: 'contentfiles\\any\\any\\wpinative') },
{ file (src: "${cvSharedLocation}/*.so.3.2".replace('/', '\\'), target: 'contentfiles\\any\\any\\wpinative') },
{ file (src: "${rootDir}/ImageSettings.json", target: 'contentfiles\\any\\any\\wpinative') },
{ file (src: wpiUtilSharedLib, target: 'content\\wpinative') },
{ file (src: halSharedLib, target: 'content\\wpinative') },
//{ file (src: netSharedLib, target: 'content\\wpinative') },
{ file (src: cscoreSharedLib, target: 'content\\wpinative') },
{ file (src: "${rootDir}/temp/cvsharp/build/libs/openCvSharpExtern/shared/libOpenCvSharpExtern.so", target: 'content\\wpinative') },
{ file (src: "${cvSharedLocation}/*.so.3.2".replace('/', '\\'), target: 'content\\wpinative') }
]
]
}
// Empty task for build so that zips will be
// built when running ./gradlew build
//task build
nugetPack.dependsOn unzipWpiUtil
nugetPack.dependsOn unzipHAL
//nugetPack.dependsOn unzipNetworkTables
nugetPack.dependsOn unzipCsCore
nugetPack.dependsOn unzipCv
build.dependsOn nugetPack
//apply from: "releases.gradle"
clean {
delete buildDir
delete releaseDir
}
task wrapper(type: Wrapper) {
gradleVersion = '3.2.1'
}