Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/gen_io_types.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,6 @@ on:
permissions:
contents: write
jobs:
gen_io_types:
runs-on: ubuntu-latest
env:
# This line prevents the action from running after an automated push.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# Check out push
- uses: actions/checkout@v3
# Install Rust
- uses: dtolnay/rust-toolchain@stable
# Generate IOTypes.java
- name: Run gen_io_types
working-directory: gen_io_types
run: cargo run
- name: Install openjdk17
run: sudo apt-get install openjdk-17-jdk
# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Runs a single command using the runners shell
- name: Compile and run tests on robot code
run: ./gradlew build
# Commit and push new type
- name: Commit IOTypes
run: |
git config --global user.name 'Action'
git config --global user.email 'wilsonwatson@users.noreply.github.com'
git add -f src/main/java/org/frc5572/robotools/IOTypes.java
git commit -m "Generate IOTypes.java" || true
git push
linting:
name: Linting
runs-on: ubuntu-latest
Expand Down
73 changes: 73 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.server.launchMode": "Standard",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"bin/": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
"**/*~": true
},
"java.test.config": [
{
"name": "WPIlibUnitTests",
"workingDirectory": "${workspaceFolder}/build/jni/release",
"vmargs": [
"-Djava.library.path=${workspaceFolder}/build/jni/release"
],
"env": {
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release",
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
}
},
],
"java.test.defaultConfig": "WPIlibUnitTests",
"java.format.settings.url": "formatter.xml",
"java.format.settings.profile": "GoogleStyle",
"[java]": {
"editor.defaultFormatter": "redhat.java",
},
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"terminal.integrated.defaultProfile.windows": "Git Bash",
"java.import.gradle.annotationProcessing.enabled": false,
"java.completion.favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*",
"edu.wpi.first.units.Units.*"
],
"java.completion.filteredTypes": [
"java.awt.*",
"com.sun.*",
"sun.*",
"jdk.*",
"org.graalvm.*",
"io.micrometer.shaded.*",
"java.beans.*",
"java.util.Base64.*",
"java.util.Timer",
"java.sql.*",
"javax.swing.*",
"javax.management.*",
"javax.smartcardio.*",
"edu.wpi.first.math.proto.*",
"edu.wpi.first.math.**.proto.*",
"edu.wpi.first.math.**.struct.*",
]
}
17 changes: 2 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@ plugins {
id 'maven-publish'
}

tasks.withType(JavaCompile) {
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
options.compilerArgs << '--add-exports' << 'jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED'
}

// sourceCompatibility = JavaVersion.VERSION_17
// targetCompatibility = JavaVersion.VERSION_17

Expand All @@ -25,7 +12,7 @@ repositories {
}

dependencies {

implementation "com.squareup:javapoet:1.13.0"
}

publishing {
Expand All @@ -34,7 +21,7 @@ publishing {
// Use jitpack format for publishing to mavenLocal
groupId = 'com.github.Frc5572'
artifactId = 'RobotTools'
version = 'main-SNAPSHOT'
version = 'test-SNAPSHOT'

from components.java
}
Expand Down
2 changes: 1 addition & 1 deletion checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="100"/>
<property name="max" value="300"/>
<!-- <property name="severity" value="ignore"/> -->
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
Expand Down
2 changes: 0 additions & 2 deletions gen_io_types/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions gen_io_types/Cargo.toml

This file was deleted.

192 changes: 0 additions & 192 deletions gen_io_types/src/java.rs

This file was deleted.

Loading