Skip to content

Commit

Permalink
Merge pull request #3 from UCBoulder/ATDT-331-deploy-to-github
Browse files Browse the repository at this point in the history
ATDT-331: Deploy to GitHub
  • Loading branch information
MakotoTheKnight authored Aug 23, 2024
2 parents 97a82ce + 5057f8e commit e80f755
Show file tree
Hide file tree
Showing 19 changed files with 239 additions and 285 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,9 @@ jobs:
java-version: 17
cache: 'gradle'

- name: Test and Compile with Gradle
- name: Test and Compile with Gradle, and publish artifacts
run: |
./gradlew \
-PartifactoryUsername="${{ secrets.ARTIFACTORY_USERNAME }}" \
-PartifactoryPassword="${{ secrets.ARTIFACTORY_API_KEY }}" \
clean check --parallel
- name: Publish JARs to Artifactory
run: |
./gradlew \
-PartifactoryUsername="${{ secrets.ARTIFACTORY_USERNAME }}" \
-PartifactoryPassword="${{ secrets.ARTIFACTORY_API_KEY }}" \
publish --parallel -x check
-PgithubUsername="${{ secrets.REPOSITORY_USERNAME }}" \
-PgithubPassword="${{ secrets.REPOSITORY_TOKEN }}" \
clean check assemble publish --parallel
6 changes: 3 additions & 3 deletions .github/workflows/dependency-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
java-version: 17
cache: 'gradle'
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
dependency-graph: generate-and-submit
- name: Run a build and generate the dependency graph which will be submitted post-job
run: |
./gradlew \
-PartifactoryUsername="${{ secrets.ARTIFACTORY_USERNAME }}" \
-PartifactoryPassword="${{ secrets.ARTIFACTORY_API_KEY }}" \
-PgithubUsername="${{ secrets.REPOSITORY_USERNAME }}" \
-PgithubPassword="${{ secrets.REPOSITORY_TOKEN }}" \
assemble -x test
4 changes: 2 additions & 2 deletions .github/workflows/release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: Assemble and publish
run: |
./gradlew \
-PartifactoryUsername=${{ secrets.ARTIFACTORY_USERNAME }} \
-PartifactoryPassword=${{ secrets.ARTIFACTORY_API_KEY }} \
-PgithubUsername="${{ secrets.REPOSITORY_USERNAME }}" \
-PgithubPassword="${{ secrets.REPOSITORY_TOKEN }}" \
-Prelease="true" \
-Penvironment=production \
-Preckon.stage="final" \
Expand Down
39 changes: 0 additions & 39 deletions build.gradle

This file was deleted.

72 changes: 72 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
plugins {
id("java-library")
id("maven-publish")
alias(libs.plugins.reckon)
alias(libs.plugins.ben.manes.versions)
alias(libs.plugins.sweng.publication)
alias(libs.plugins.version.catalog.update)
}

group = "edu.ksu.canvas"
description = "Canvas API Library"

reckon {
scopeFromProp()
snapshotFromProp()
}

repositories {
mavenCentral()
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.ADOPTIUM

withJavadocJar()
withSourcesJar()
}
}

tasks.named<Test>("test") {
useJUnitPlatform()
testLogging {
events("started", "passed", "failed", "skipped")
testLogging.showStandardStreams = true
showStackTraces = true
}
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = project.name
version = "${project.version}"

from(components["java"])
}
}
}

dependencies {
implementation(libs.validation.api)
implementation(libs.gson)
implementation(libs.commons.lang3)
implementation(libs.guava)
implementation(libs.slf4j.api)
implementation(libs.slf4j.simple)
implementation(libs.httpclient)
implementation(libs.httpmime)
testImplementation(libs.junit.jupiter)
testImplementation(libs.httpclient) { artifact { classifier = "tests" } }
testImplementation(libs.spring.beans)
testImplementation(libs.spring.context)
testImplementation(libs.spring.test)
testImplementation(libs.mockito.core)
testImplementation(libs.mockito.junit.jupiter)
testImplementation(libs.hamcrest)
}


12 changes: 0 additions & 12 deletions buildSrc/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion buildSrc/settings.gradle

This file was deleted.

40 changes: 0 additions & 40 deletions buildSrc/src/main/groovy/common-methods.gradle

This file was deleted.

14 changes: 0 additions & 14 deletions buildSrc/src/main/groovy/java-conventions.gradle

This file was deleted.

13 changes: 0 additions & 13 deletions buildSrc/src/main/groovy/library-conventions.gradle

This file was deleted.

33 changes: 0 additions & 33 deletions buildSrc/src/main/groovy/publication-conventions.gradle

This file was deleted.

22 changes: 0 additions & 22 deletions buildSrc/src/main/groovy/unit-test-conventions.gradle

This file was deleted.

38 changes: 38 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[versions]
commons-lang3 = "3.16.0"
gson = "2.11.0"
guava = "33.2.1-jre"
hamcrest = "3.0"
junit-jupiter = "5.11.0"
org-apache-httpcomponents = "4.5.14"
org-mockito = "5.12.0"
org-slf4j = "2.0.16"
org-springframework = "6.1.12"
plugin-ben-manes-versions = "0.51.0"
plugin-reckon = "0.13.1"
plugin-sweng-publication = "2.+"
plugin-version-catalog-update = "0.8.4"
validation-api = "2.0.1.Final"

[libraries]
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" }
httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "org-apache-httpcomponents" }
httpmime = { module = "org.apache.httpcomponents:httpmime", version.ref = "org-apache-httpcomponents" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "org-mockito" }
mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "org-mockito" }
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "org-slf4j" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "org-slf4j" }
spring-beans = { module = "org.springframework:spring-beans", version.ref = "org-springframework" }
spring-context = { module = "org.springframework:spring-context", version.ref = "org-springframework" }
spring-test = { module = "org.springframework:spring-test", version.ref = "org-springframework" }
validation-api = { module = "javax.validation:validation-api", version.ref = "validation-api" }

[plugins]
ben-manes-versions = { id = "com.github.ben-manes.versions", version.ref = "plugin-ben-manes-versions" }
reckon = { id = "org.ajoberstar.reckon", version.ref = "plugin-reckon" }
sweng-publication = { id = "edu.colorado.oit.se.gradle.github-repository-convention", version.ref = "plugin-sweng-publication" }
version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "plugin-version-catalog-update" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit e80f755

Please sign in to comment.