Skip to content

Commit

Permalink
Merge branch 'main' into GHActions2
Browse files Browse the repository at this point in the history
  • Loading branch information
sciencewhiz committed Jun 6, 2024
2 parents ace4646 + 35280ce commit ce90a39
Show file tree
Hide file tree
Showing 271 changed files with 5,364 additions and 3,218 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ jobs:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
28 changes: 28 additions & 0 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Manual Publish

on:
workflow_dispatch:
inputs:
publish_version:
description: 'Version to publish. This should be in the form of vYEAR.M.m'
default: 'vYEAR.M.m'
required: true

jobs:
publish:
name: "Publish"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Publish
run: ./gradlew publish -PbuildServer -PpublishVersion=${{ github.event.inputs.publish_version }}
env:
RUN_AZURE_ARTIFACTORY_RELEASE: "TRUE"
ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
save*.yaml
*~
*#
/test-resources/RobotBuilderTestProject/*
/test-resources/
/.svn/*
*.exec
dependency-reduced-pom.xml
nbactions.xml

src/main/resources/export/vendordeps/
/test/



Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ While the library should be fully formatted according to the styles, additional

### Pull Request Format

Changes should be submitted as a Pull Request against the master branch of WPILib. For most changes, we ask that you squash your changes down to a single commit. For particularly large changes, multiple commits are ok, but assume one commit unless asked otherwise. No change will be merged unless it is up to date with the current master. We will also not merge any changes with merge commits in them; please rebase off of master before submitting a pull request. We do this to make sure that the git history isn't too cluttered.
Changes should be submitted as a Pull Request against the main branch of WPILib. For most changes, we ask that you squash your changes down to a single commit. For particularly large changes, multiple commits are ok, but assume one commit unless asked otherwise. No change will be merged unless it is up to date with the current main. We will also not merge any changes with merge commits in them; please rebase off of main before submitting a pull request. We do this to make sure that the git history isn't too cluttered.

### Merge Process

When you first submit changes, Azure DevOps will attempt to run `./gradlew check` on your change. If this fails, you will need to fix any issues that it sees. Once Azure passes, we will begin the review process in more earnest. One or more WPILib team members will review your change. This will be a back-and-forth process with the WPILib team and the greater community. Once all tests have passed and the team is satisfied, we will merge your change into the WPILib repository.

## Licensing

By contributing to WPILib, you agree that your code will be distributed with WPILib, and licensed under the license for the WPILib project. You should not contribute code that you do not have permission to relicense in this manner. This includes code that is licensed under the GPL that you do not have permission to relicense, as WPILib is not released under a copyleft license. Our license is the 3-clause BSD license, which you can find [here](LICENSE.txt).
By contributing to WPILib, you agree that your code will be distributed with WPILib, and licensed under the license for the WPILib project. You should not contribute code that you do not have permission to relicense in this manner. This includes code that is licensed under the GPL that you do not have permission to relicense, as WPILib is not released under a copyleft license. Our license is the 3-clause BSD license, which you can find [here](LICENSE.md).
24 changes: 24 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2009-2023 FIRST and other WPILib contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of FIRST, WPILib, nor the names of other WPILib
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 changes: 0 additions & 24 deletions LICENSE.txt

This file was deleted.

29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
# Robot Builder Project
# RobotBuilder Project
[![CI](https://github.com/wpilibsuite/RobotBuilder/workflows/CI/badge.svg)
[![codecov.io](http://codecov.io/github/wpilibsuite/RobotBuilder/coverage.svg?branch=master)](http://codecov.io/github/wpilibsuite/RobotBuilder?branch=master)

Welcome to the WPILib project. This repository contains the Robot Builder project. This program can be used to automatically generate Java and C++ FRC programs.
Welcome to the WPILib project. This repository contains the RobotBuilder project. This program can be used to automatically generate Java and C++ FRC programs using the [New Command Framework](https://docs.wpilib.org/en/stable/docs/software/commandbased/index.html).

- [WPILib Mission](#wpilib-mission)
- [Building Robot Builder](#building-wpilib)
- [Building RobotBuilder](#building-robotbuilder)
- [Requirements](#requirements)
- [Running Robot Builder](#running)
- [Running RobotBuilder](#running)
- [Building RobotBuilder](#building)
- [Contributing to WPILib](#contributing-to-wpilib)

## WPILib Mission

The WPILib Mission is to enable FIRST teams to focus on writing game-specific software rather than on hardware details - "raise the floor, don't lower the ceiling". We try to enable teams with limited programming knowledge and/or mentor experience to do as much as possible, while not hampering the abilities of teams with more advanced programming capabilities. We support Kit of Parts control system components directly in the library. We also strive to keep parity between major features of each language (Java, C++, and NI's LabVIEW), so that teams aren't at a disadvantage for choosing a specific programming language. WPILib is an open-source project, licensed under the BSD 3-clause license. You can find a copy of the license [here](LICENSE.txt).
The WPILib Mission is to enable FIRST teams to focus on writing game-specific software rather than on hardware details - "raise the floor, don't lower the ceiling". We try to enable teams with limited programming knowledge and/or mentor experience to do as much as possible, while not hampering the abilities of teams with more advanced programming capabilities. We support Kit of Parts control system components directly in the library. We also strive to keep parity between major features of each language (Java, C++, and NI's LabVIEW), so that teams aren't at a disadvantage for choosing a specific programming language. WPILib is an open-source project, licensed under the BSD 3-clause license. You can find a copy of the license [here](LICENSE.md).

# Building Robot Builder
# Building RobotBuilder

Building Robot Builder is very straightforward. WPILib uses Gradle to compile.
Building RobotBuilder is very straightforward. WPILib uses Gradle to compile.

## Requirements
- [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- [JDK 17](https://adoptium.net/temurin/releases/?variant=openjdk17&jvmVariant=hotspot)
- A c++ Compiler (for c++ compile test). Any one of:
- On Linux, install GCC 11+
- On Windows, install [Visual Studio Community 2022](https://visualstudio.microsoft.com/vs/community/) and select the C++ programming language during installation
- On macOS, install the Xcode command-line build tools via `xcode-select --install`
- ARM compiler toolchain
- Run `./gradlew installRoboRioToolchain` from a robot project
- If the WPILib installer was used, this toolchain is already installed

## Running

To run robotbuilder use the command `./gradlew run`.
To run RobotBuilder use the command `./gradlew run`.

## Building

To build robotbuilder use the command `./gradlew shadowjar`. The runnable jar is `build\libs\RobotBuilder.jar`.
To build RobotBuilder use the command `./gradlew shadowjar`. The runnable jar is `build\libs\RobotBuilder-all.jar`.

# Contributing to WPILib

Expand Down
75 changes: 31 additions & 44 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
plugins {
id 'java'
id 'jacoco'
id 'maven'
id 'application'
id 'maven-publish'
id "com.jfrog.artifactory" version "4.9.8"
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '4.0.1'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.1'
id 'io.franzbecker.gradle-lombok' version '3.1.0'
id "com.github.johnrengelman.shadow" version "5.1.0"
id "de.undercouch.download" version "4.0.1"
id 'org.aim42.htmlSanityCheck' version '1.1.3'
id "com.jfrog.artifactory" version "4.24.14"
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '2023.0.1'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2'
id 'io.franzbecker.gradle-lombok' version '5.0.0'
id "com.github.johnrengelman.shadow" version "8.1.1"
id "de.undercouch.download" version "5.4.0"
id 'org.aim42.htmlSanityCheck' version '1.1.6'
}

if (project.hasProperty('buildServer')) {
wpilibVersioning.buildServerMode = true
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

if (project.hasProperty('releaseMode')) {
wpilibVersioning.releaseMode = true
}
wpilibVersioning.buildServerMode = project.hasProperty('buildServer')
wpilibVersioning.releaseMode = project.hasProperty('releaseMode')

repositories {
mavenCentral()
Expand Down Expand Up @@ -58,33 +55,33 @@ mainClassName = "robotbuilder.RobotBuilder"
wpilibVersioning.version.finalizeValue()

jacoco {
toolVersion = "0.8.4"
toolVersion = "0.8.10"
}

jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
xml.required = true
html.required = true
}
}

def downloadOldCommands = tasks.register('downloadOldCommands', Download) {
src 'https://raw.githubusercontent.com/wpilibsuite/allwpilib/master/wpilibOldCommands/WPILibOldCommands.json'
dest 'src/main/resources/export/vendordeps/WPILibOldCommands.json'
def downloadNewCommands = tasks.register('downloadNewCommands', Download) {
src 'https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibNewCommands/WPILibNewCommands.json'
dest 'build/resources/main/export/vendordeps/WPILibNewCommands.json'
overwrite true
}

check.dependsOn jacocoTestReport
check.dependsOn htmlSanityCheck

lombok {
version = "1.18.8"
version = "1.18.28"
sha256 = ""
}

compileJava {
options.encoding = "UTF-8"
dependsOn downloadOldCommands
dependsOn downloadNewCommands
}

if (!hasProperty('mainClass')) {
Expand All @@ -96,16 +93,16 @@ repositories {
}

dependencies {
compile 'org.apache.velocity:velocity-engine-core:2.1'
compile 'org.yaml:snakeyaml:1.25'
compile 'commons-io:commons-io:2.6'
compile 'org.apache.commons:commons-lang3:3.9'
compile 'org.slf4j:slf4j-api:1.7.28'
compile 'org.slf4j:slf4j-jdk14:1.7.28'
compile 'com.sun.activation:javax.activation:1.2.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'org.projectlombok:lombok:1.18.8'
compileOnly 'org.projectlombok:lombok:1.18.8'
implementation 'org.apache.velocity:velocity-engine-core:2.3'
implementation 'org.yaml:snakeyaml:1.33'
implementation 'commons-io:commons-io:2.13.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.slf4j:slf4j-api:2.0.7'
implementation 'org.slf4j:slf4j-jdk14:2.0.7'
implementation 'com.sun.activation:javax.activation:1.2.0'
testImplementation 'junit:junit:4.13.2'
annotationProcessor 'org.projectlombok:lombok:1.18.28'
compileOnly 'org.projectlombok:lombok:1.18.28'
}

test {
Expand All @@ -116,13 +113,6 @@ test {
}

jar {

from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}

manifest {
attributes('Implementation-Title': 'RobotBuilder',
'Implementation-Version': wpilibVersioning.version.get(),
Expand All @@ -144,7 +134,7 @@ htmlSanityCheck {
failOnErrors = true

checkerClasses = [BrokenCrossReferencesChecker,
BrokenHttpLinksChecker,
// BrokenHttpLinksChecker, //Disable link checker due to hanging on Vex links
DuplicateIdChecker,
ImageMapChecker,
MissingAltInImageTagsChecker,
Expand All @@ -158,13 +148,10 @@ publishing {
artifact(shadowJar) {
classifier null
}
groupId 'edu.wpi.first.wpilib'
groupId 'edu.wpi.first.tools'
artifactId 'RobotBuilder'
version wpilibVersioning.version.get()
}
}
}

wrapper {
gradleVersion = '5.4.1'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ce90a39

Please sign in to comment.