Skip to content

Commit

Permalink
Merge pull request #29 from Team1559/gradle-fix
Browse files Browse the repository at this point in the history
Gradle fixes
  • Loading branch information
MathNerd28 authored Sep 10, 2023
2 parents 882609f + 0ed7d61 commit 795dcb2
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 47 deletions.
86 changes: 43 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,74 +6,74 @@
import org.gradle.internal.os.OperatingSystem

plugins {
id 'java-library'
id 'maven-publish'
id "edu.wpi.first.GradleRIO" version "2023.4.3"
id 'java-library'
id 'maven-publish'
id "edu.wpi.first.GradleRIO" version "2023.4.3"
}

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

version = '0.1'

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

// Custom repo endpoints
maven { url "https://maven.ctr-electronics.com/release/" }
maven { url "https://maven.photonvision.org/repository/internal" }
maven { url "https://maven.photonvision.org/repository/snapshots" }
maven { url "https://maven.revrobotics.com/" }
// Custom repo endpoints
maven { url "https://maven.ctr-electronics.com/release/" }
maven { url "https://maven.photonvision.org/repository/internal" }
maven { url "https://maven.photonvision.org/repository/snapshots" }
maven { url "https://maven.revrobotics.com/" }

// allwpilib
maven { url "https://frcmaven.wpi.edu/artifactory/release/" }
// allwpilib
maven { url "https://frcmaven.wpi.edu/artifactory/release/" }
}

dependencies {
// Use JUnit Jupiter for testing.
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
// Use JUnit Jupiter for testing.
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'

// Add standard WPILib classes
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()
// Add standard WPILib classes
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()
}

test {
useJUnitPlatform()
useJUnitPlatform()
}

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

withSourcesJar()
}

// Add classpath to manifest
jar {
manifest {
attributes (
"Class-Path": configurations.compileClasspath.collect { it.name }.join(' ')
)
}
manifest {
attributes (
"Class-Path": configurations.compileClasspath.collect { it.name }.join(' ')
)
}
}

// Publish package to GitHub
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Team1559/DTLib")
credentials {
username = project.findProperty("gpr.user") ?: "Team1559"
password = project.findProperty("gpr.key") ?: System.getenv("GHP_PUBLISH_TOKEN")
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Team1559/DTLib")
credentials {
username = project.findProperty("gpr.user") ?: "Team1559"
password = project.findProperty("gpr.key") ?: System.getenv("GHP_PUBLISH_TOKEN")
}
}
publications {
gpr(MavenPublication) {
groupId = 'org.victorrobotics'
artifactId = 'dtlib-java'
version = '0.1'
from(components.java)
}
}
publications {
gpr(MavenPublication) {
groupId = 'org.victorrobotics'
artifactId = 'dtlib-java'
version = '0.1'
from(components.java)
}
}
}
8 changes: 4 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
repositories {
mavenLocal()
gradlePluginPortal()
}
}

0 comments on commit 795dcb2

Please sign in to comment.