-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
101 lines (88 loc) · 2.74 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
91
92
93
94
95
96
97
98
99
100
101
buildscript {
repositories {
mavenCentral()
maven {
name "gradle plugins"
url "https://plugins.gradle.org/m2/"
}
maven {
name "central snapshots"
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath group: 'com.techshroom', name: 'Aversion', version: '3.0.0'
}
}
plugins {
id "net.ltgt.apt" version "0.9"
id "com.github.hierynomus.license" version "0.13.1"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'aversion-util'
util {
javaVersion = '1.8'
}
idea.project.languageLevel = util.javaVersion
repositories {
mavenCentral()
maven {
name "central snapshots"
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name "local files"
url "libs"
}
}
dependencies {
// Dependencies from /libs. These are copied from the FRC installation folder in your home directory.
compile group: 'edu.wpi', name: 'cscore', version: 'NONE'
compile group: 'edu.wpi', name: 'CTRLib', version: 'NONE'
compile group: 'edu.wpi', name: 'NetworkTables', version: 'NONE'
compile group: 'edu.wpi', name: 'opencv', version: 'NONE'
compile group: 'edu.wpi', name: 'WPILib', version: 'NONE'
compile group: 'com.kuailabs', name: 'navx_frc', version: 'NONE'
// Neat graph util
compile group: 'org.jfree', name: 'jfreechart', version: '1.0.19'
// Auto-value!
compileOnly group: 'com.google.auto.value', name: 'auto-value', version: '1.4-rc2'
apt group: 'com.google.auto.value', name: 'auto-value', version: '1.4-rc2'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
// Add eclipse FRC nature
eclipse.project.file.beforeMerged { proj ->
proj.natures.add('edu.wpi.first.wpilib.plugins.core.nature.FRCProjectNature')
}
// Move source into src
sourceSets.main.java.srcDirs = ['src']
sourceSets.main.resources.srcDirs = ['src']
// Setup compiling to be better.
configure([compileJava, compileTestJava]) {
options.compilerArgs += ['-Xlint:all', '-Xlint:-path']
options.deprecation = true
options.encoding = 'UTF-8'
options.incremental = true
options.fork = true
}
// License configuration
license {
ext {
name = project.name
organization = project.organization
url = project.url
}
header = rootProject.file('HEADER.txt')
ignoreFailures = false
strictCheck = true
include '**/*.java'
mapping {
java = 'SLASHSTAR_STYLE'
}
}
// configurations for the ant-replacement code
ext.packageNumber = '5818'
ext.teamNumber = project.findProperty('teamNumber') ?: packageNumber
apply from: 'ant-replacement.gradle', to: project