mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Add a java version of the dev app. (#218)
This commit is contained in:
committed by
Peter Johnson
parent
ea028a3822
commit
d9c754c30f
16
build.gradle
16
build.gradle
@@ -44,6 +44,10 @@ if (project.hasProperty('onlyAthena')) {
|
||||
test.enabled = false
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
dev
|
||||
}
|
||||
|
||||
task nativeTestFilesJar(type: Jar) {
|
||||
destinationDir = project.buildDir
|
||||
classifier = "nativeTestFiles"
|
||||
@@ -62,13 +66,23 @@ task nativeTestFilesJar(type: Jar) {
|
||||
}
|
||||
}
|
||||
|
||||
task run(type: JavaExec) {
|
||||
classpath = sourceSets.dev.runtimeClasspath
|
||||
|
||||
main = 'edu.wpi.first.ntcore.DevMain'
|
||||
}
|
||||
|
||||
test.dependsOn nativeTestFilesJar
|
||||
run.dependsOn nativeTestFilesJar
|
||||
|
||||
|
||||
dependencies {
|
||||
compile 'edu.wpi.first.wpiutil:wpiutil-java:+'
|
||||
runtime 'edu.wpi.first.wpiutil:wpiutil-java:+'
|
||||
testCompile 'junit:junit:4.12'
|
||||
testRuntime files(project(':').nativeTestFilesJar.archivePath)
|
||||
devCompile 'edu.wpi.first.wpiutil:wpiutil-java:+'
|
||||
devCompile sourceSets.main.output
|
||||
devRuntime files(project(':').nativeTestFilesJar.archivePath)
|
||||
}
|
||||
|
||||
|
||||
|
||||
12
src/dev/java/edu/wpi/first/ntcore/DevMain.java
Normal file
12
src/dev/java/edu/wpi/first/ntcore/DevMain.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package edu.wpi.first.ntcore;
|
||||
|
||||
import edu.wpi.first.wpilibj.networktables.NetworkTablesJNI;
|
||||
import edu.wpi.first.wpiutil.RuntimeDetector;
|
||||
|
||||
public class DevMain {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
System.out.println(RuntimeDetector.getPlatformPath());
|
||||
NetworkTablesJNI.flush();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user