-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch example build to search for folder names lol
- Loading branch information
Showing
10 changed files
with
60 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## PhotonLib C++ Examples | ||
|
||
### Building | ||
|
||
Build photonvision and publish it locally with: | ||
|
||
``` | ||
photonvision$ ./gradlew photon-lib:publishtomavenlocal | ||
``` | ||
|
||
Now, cd into here, pull in the latest vendor json, and simulate the project of choice | ||
|
||
``` | ||
photonvision/photonlib-cpp-exaples: ./gradlew copyPhotonlib | ||
photonvision/photonlib-cpp-exaples: ./gradlew aimandrange:simulateNativeRelease | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// These should be the only 2 non-project subdirectories in the examples folder | ||
// I could check for (it)/build.gradle to exist, but w/e | ||
def EXCLUDED_DIRS = [".gradle", "bin"] | ||
|
||
// List all non-hidden directories not in EXCUDED_DIRS | ||
ext.exampleFolderNames = file("${rootDir}") | ||
.listFiles() | ||
.findAll { it.isDirectory() && !it.isHidden() && !(it.name in EXCLUDED_DIRS) } | ||
.collect { it.name } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
new File('examples.txt').eachLine { line -> include line } | ||
apply from: "examples.gradle" | ||
|
||
exampleFolderNames.each { line -> include line } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// These should be the only 2 non-project subdirectories in the examples folder | ||
// I could check for (it)/build.gradle to exist, but w/e | ||
def EXCLUDED_DIRS = [".gradle", "bin"] | ||
|
||
// List all non-hidden directories not in EXCUDED_DIRS | ||
ext.exampleFolderNames = file("${rootDir}") | ||
.listFiles() | ||
.findAll { it.isDirectory() && !it.isHidden() && !(it.name in EXCLUDED_DIRS) } | ||
.collect { it.name } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
include 'photon-targeting' | ||
include 'photon-core' | ||
include 'photon-server' | ||
include 'photon-lib' | ||
apply from: "examples.gradle" | ||
|
||
new File('examples.txt').eachLine { line -> include line } | ||
exampleFolderNames.each { line -> include line } |