Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIXI-141: Update plugin for XNAT 1.9 #20

Merged
merged 5 commits into from
Dec 19, 2024
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
37 changes: 37 additions & 0 deletions .github/actions/build-plugin-jar/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Build PIXI Plugin JAR'
description: 'Builds the PIXI plugin JAR file'
inputs:
java-version:
description: 'The version of Java to set up'
required: true
default: '8'
gradle-version:
description: 'The version of Gradle to set up'
required: true
default: '6.7'
outputs:
jar-path:
description: 'The path to the built JAR file'
runs:
using: 'composite'
steps:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
distribution: 'zulu'
java-package: 'jdk'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ inputs.gradle-version }}

- name: Build JAR with Gradle Wrapper
shell: bash
run: ./gradlew clean jar

- name: Set output
id: set-output
shell: bash
run: echo "jar-path=build/libs/*.jar" >> $GITHUB_OUTPUT
38 changes: 0 additions & 38 deletions .github/workflows/build-plugin-jar.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Main

on:
push:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Build PIXI Plugin JAR
uses: ./.github/actions/build-plugin-jar
with:
java-version: '8'
gradle-version: '6.7'

- name: Upload JAR
uses: actions/upload-artifact@v4
with:
name: pixi-plugin-jar
path: ${{ env.jar-path }}
retention-days: 14
23 changes: 23 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pull Request

on:
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Build PIXI Plugin JAR
uses: ./.github/actions/build-plugin-jar
with:
java-version: '8'
gradle-version: '6.7'
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
- name: Build JAR
uses: ./.github/actions/build-plugin-jar
with:
java-version: '8'
distribution: 'zulu'
java-package: jdk

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 6.7

- name: Build JAR with Gradle Wrapper
run: ./gradlew clean jar
gradle-version: '6.7'

- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: build/libs/*.jar
files: ${{ env.jar-path }}
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-beta') || contains(github.ref, '-alpha') }}
body: The plugin JAR is attached to this release.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
plugins {
id "java"
id "org.nrg.xnat.build.xnat-data-builder" version "1.8.10"
id "org.nrg.xnat.build.xnat-data-builder" version "1.9.1"
id "io.freefair.lombok" version "6.0.0-m2"
}

Expand All @@ -26,7 +26,7 @@ configurations {
}

dependencies {
xnatProvided platform("org.nrg:parent:1.8.10")
xnatProvided platform("org.nrg:parent:1.9.1")
xnatProvided "org.nrg:framework"
xnatProvided "org.nrg.xnat:xnat-data-models"
xnatProvided "org.nrg.xnat:web"
Expand All @@ -38,6 +38,8 @@ dependencies {
}

dependencies {
implementation 'org.projectlombok:lombok:1.18.24'
implementation 'javax.validation:validation-api:2.0.1.Final'
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-guava"
testImplementation "junit:junit"
testImplementation "com.h2database:h2"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import javax.annotation.Nullable;
import javax.persistence.Entity;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.NotBlank;

@Entity
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import javax.annotation.Nullable;
import javax.persistence.Entity;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.NotBlank;

@Entity
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import lombok.*;
import lombok.extern.slf4j.Slf4j;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.URL;
import org.nrg.framework.orm.hibernate.AbstractHibernateEntity;

import javax.annotation.Nullable;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
Expand Down
Loading