forked from PseudoResonance/Pixy2JavaAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (77 loc) · 2.46 KB
/
build.gradle
File metadata and controls
86 lines (77 loc) · 2.46 KB
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
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2019.2.1"
id "maven-publish"
}
// Set this to true to enable desktop support.
def includeDesktopSupport = false
// Maven central needed for JUnit
repositories {
mavenCentral()
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
}
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 4.
dependencies {
implementation wpi.deps.wpilib()
implementation wpi.deps.vendor.java()
testImplementation 'junit:junit:4.12'
}
ext {
jarToPublish = file( 'pixy2-java-api.jar' )
}
jar {
baseName 'pixy2-java-api'
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
groupId = 'pw.otake.pseudoresonance'
artifactId = 'pixy2-java-api'
version = '1.3.3'
pom {
name = 'Pixy2JavaAPI'
description = 'Java port of Pixy2 API for FIRST Robotics'
url = 'https://github.com/PseudoResonance/Pixy2JavaAPI/'
licenses {
license {
name = 'GNU General Public License, version 2'
url = 'http://www.gnu.org/licenses/gpl-2.0.html'
}
}
developers {
developer {
id = 'PseudoResonance'
name = 'PseudoResonance'
email = 'kaio11602@gmail.com'
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "http://192.168.1.15:8081/repository/maven-releases/"
def snapshotsRepoUrl = "http://192.168.1.15:8081/repository/maven-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.hasProperty('nexus_username') ? nexus_username : ''
password = project.hasProperty('nexus_password') ? nexus_password : ''
}
}
}
}