Skip to content

Commit

Permalink
Fix build errors and enable publishing to build jar artifacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidnem committed Aug 21, 2024
1 parent 18aeea1 commit aaef2ce
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 3 deletions.
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
allprojects {
version = '0.0'
group = 'com.github.team401'
}

subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'

publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
}
}
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ plugins {
}

rootProject.name = 'coppercore'
include('geometry, wpi_interface')
include('geometry', 'wpi_interface')
6 changes: 5 additions & 1 deletion wpi_interface/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import java.text.SimpleDateFormat

plugins {
id "java"
id "maven-publish"
id "edu.wpi.first.GradleRIO" version "2024.3.2"
id "com.peterabeles.gversion" version "1.10"
id "com.diffplug.spotless" version "6.24.0"
Expand Down Expand Up @@ -91,6 +92,8 @@ dependencies {

testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

implementation 'com.googlecode.json-simple:json-simple:1.1.1'
}

test {
Expand Down Expand Up @@ -140,6 +143,7 @@ repositories {
password = "\u0067\u0068\u0070\u005f\u006e\u0056\u0051\u006a\u0055\u004f\u004c\u0061\u0079\u0066\u006e\u0078\u006e\u0037\u0051\u0049\u0054\u0042\u0032\u004c\u004a\u006d\u0055\u0070\u0073\u0031\u006d\u0037\u004c\u005a\u0030\u0076\u0062\u0070\u0063\u0051"
}
}
mavenCentral()
mavenLocal()
}

Expand Down Expand Up @@ -199,4 +203,4 @@ task (commitOnDeploy, dependsOn: "spotlessApply") {
}
}

// compileJava.dependsOn commitOnDeploy
// compileJava.dependsOn commitOnDeploy
2 changes: 1 addition & 1 deletion wpi_interface/src/main/java/ControllerJSONReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,4 @@ public static HashMap<String, IntSupplier> getPOVs() {
return pov;
}
}
}
}
17 changes: 17 additions & 0 deletions wpi_interface/src/main/java/frc/robot/BuildConstants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package frc.robot;

/** Automatically generated file containing build version information. */
public final class BuildConstants {
public static final String MAVEN_GROUP = "com.github.team401";
public static final String MAVEN_NAME = "wpi_interface";
public static final String VERSION = "0.0";
public static final int GIT_REVISION = 14;
public static final String GIT_SHA = "18aeea1d8ec130e803b61501a67f53881c126435";
public static final String GIT_DATE = "2024-08-19 19:21:49 EDT";
public static final String GIT_BRANCH = "9-enable-publishing";
public static final String BUILD_DATE = "2024-08-20 21:08:15 EDT";
public static final long BUILD_UNIX_TIME = 1724202495398L;
public static final int DIRTY = 1;

private BuildConstants() {}
}
42 changes: 42 additions & 0 deletions wpi_interface/vendordeps/AdvantageKit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"fileName": "AdvantageKit.json",
"name": "AdvantageKit",
"version": "3.2.0",
"uuid": "d820cc26-74e3-11ec-90d6-0242ac120003",
"frcYear": "2024",
"mavenUrls": [],
"jsonUrl": "https://github.com/Mechanical-Advantage/AdvantageKit/releases/latest/download/AdvantageKit.json",
"javaDependencies": [
{
"groupId": "org.littletonrobotics.akit.junction",
"artifactId": "wpilib-shim",
"version": "3.2.0"
},
{
"groupId": "org.littletonrobotics.akit.junction",
"artifactId": "junction-core",
"version": "3.2.0"
},
{
"groupId": "org.littletonrobotics.akit.conduit",
"artifactId": "conduit-api",
"version": "3.2.0"
}
],
"jniDependencies": [
{
"groupId": "org.littletonrobotics.akit.conduit",
"artifactId": "conduit-wpilibio",
"version": "3.2.0",
"skipInvalidPlatforms": false,
"isJar": false,
"validPlatforms": [
"linuxathena",
"windowsx86-64",
"linuxx86-64",
"osxuniversal"
]
}
],
"cppDependencies": []
}
38 changes: 38 additions & 0 deletions wpi_interface/vendordeps/WPILibNewCommands.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"fileName": "WPILibNewCommands.json",
"name": "WPILib-New-Commands",
"version": "1.0.0",
"uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266",
"frcYear": "2024",
"mavenUrls": [],
"jsonUrl": "",
"javaDependencies": [
{
"groupId": "edu.wpi.first.wpilibNewCommands",
"artifactId": "wpilibNewCommands-java",
"version": "wpilib"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "edu.wpi.first.wpilibNewCommands",
"artifactId": "wpilibNewCommands-cpp",
"version": "wpilib",
"libName": "wpilibNewCommands",
"headerClassifier": "headers",
"sourcesClassifier": "sources",
"sharedLibrary": true,
"skipInvalidPlatforms": true,
"binaryPlatforms": [
"linuxathena",
"linuxarm32",
"linuxarm64",
"windowsx86-64",
"windowsx86",
"linuxx86-64",
"osxuniversal"
]
}
]
}

0 comments on commit aaef2ce

Please sign in to comment.