Skip to content

Commit

Permalink
Merge branch 'develop' for release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoliverio committed Nov 11, 2024
2 parents 15dce85 + 9ad67eb commit 883306d
Show file tree
Hide file tree
Showing 17 changed files with 820 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
.gradle
**/build/
!src/**/build/
Expand All @@ -19,3 +20,6 @@ gradle-app.setting
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

# Ignore Gradle build output directory
build
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.1.0] - 2024-11-10

Initial features added to this project.

### Added
- `LoadableConfig`: Dynamically load POJOs from a _*.toml_
- `TunedJoystick`: Lets user customize feedback response from controller joysticks

51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# battleaid
# battleaid

In October of 1571, Christendom faced destruction at the hands of the invading Ottoman Turks and their undefeated navy. The only defense for Christendom was an improvised fleet from various Catholic countries, 'The Holy League', which paled in size to the Ottoman's. In desperation, Pope Pius V called on all of Europe to pray the Rosary and ask for the intercession of the Blessed Virgin Mary.
Against overwhelming odds, the Holy League emerged victorious, shattering the perceived invincibility of the Ottomans. Pope Pius V, attributing the victory to the Virgin Mary's intercession, instituted the feast day "Our Lady of Victory" in thanksgiving.

**battleaid** is dedicated to Our Lady of Victory.

```
O Victorious Lady! Thou who has ever such powerful influence with thy Divine Son,
in conquering the hardest of hearts, intercede for those for whom we pray,
that their hearts being softened by the rays of Divine Grace, they may return to the
unity of the true Faith, through Christ, our Lord.
Amen.
- Father Baker, circa 1874
```

## Introduction

**battleaid** is a library containing various features designed to aid in the development of FRC robot projects for Team 4206, the Robovikes.

### Quick Start

1. Generate a GitHub access token (classic) with `read:packages` permission and copy it your clipboard.

2. Open a terminal in your project and run the following:
- `export USERNAME=<your_github_username_here>`
- `export TOKEN=<the_token_from_github>`

3. In your FRC robot project in WPILib, add this to the top of your `build.gradle` file:
```
repositories {
maven {
url = uri("https://maven.pkg.github.com/frc4206/battleaid")
credentials {
username = project.findProperty("USERNAME")
password = project.findProperty("TOKEN")
}
}
}
```
4. Add the following to your list of dependencies:
```
dependencies {
...
implementation 'org.team4206:battleaid:<version_number>'
}
```

5. In your terminal, run `./gradlew build`.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
64 changes: 64 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java library project to get you started.
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.10.2/userguide/building_java_projects.html in the Gradle documentation.
* This project uses @Incubating APIs which are subject to change.
*/

val vrsn = project.file("VERSION").readText().trim();
project.version = vrsn.toString();

plugins {
// Apply the java-library plugin for API and implementation separation.
id("java-library")
id("edu.wpi.first.GradleRIO") version "2024.3.2"
id("maven-publish")
}

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}

dependencies {
api("edu.wpi.first.wpilibj:wpilibj-java:2024.3.2")
api("edu.wpi.first.wpiutil:wpiutil-java:2024.3.2")
api("org.tomlj:tomlj:1.1.1")
}

testing {
suites {
// Configure the built-in test suite
val test by getting(JvmTestSuite::class) {
// Use JUnit4 test framework
useJUnit("4.13.2")
}
}
}

// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/frc4206/battleaid")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
}
publications {
register<MavenPublication>("gpr"){
groupId = "org.team4206"
from(components["java"])
}
}
}
16 changes: 16 additions & 0 deletions bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

var=$(cat VERSION)
IFS=. read -r version minor patch <<EOF
$var
EOF

case "$1" in
major) tag="$((version+1)).0.0"; ;;
minor) tag="$version.$((minor+1)).0"; ;;
patch) tag="$version.$minor.$((patch+1))"; ;;
*) echo "Specify: major, minor, patch"; exit 1; ;;
esac

echo "$(printf "%s" "$var") -> $(printf "%s" "$tag")"
printf "%s" "$tag" > VERSION
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties

org.gradle.parallel=true
org.gradle.caching=true

10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
commons-math3 = "3.6.1"
guava = "33.2.1-jre"

[libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=permwrapper/dists
Loading

0 comments on commit 883306d

Please # to comment.