Skip to content

Commit

Permalink
GitHub Workflow Setup (#4)
Browse files Browse the repository at this point in the history
* feat(workflow): ci init

* fix(workflow): gradlew executable permission

* fix(workflow): java version

* feat(gradle): publish artifact

* feat(gradle): switch to subprojects
  • Loading branch information
itIsMaku authored Apr 18, 2023
1 parent decd26d commit 0ff4e08
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 94 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '15'
distribution: 'adopt'
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- run: ./gradlew build
- uses: actions/upload-artifact@v2
with:
name: Package
path: build/libs
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,24 @@ repositories {
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
}

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

publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'com.github.itIsMaku'
artifactId = project.name
version = project.version

from components.java
pom {
name = 'Mommons'
}
}
}
}
}
20 changes: 1 addition & 19 deletions mommons-bungee/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,4 @@ dependencies {
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'commons-io:commons-io:20030203.000550'
implementation 'commons-codec:commons-codec:1.9'
}

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}

repositories {
maven {
url 'https://repo.repsy.io/mvn/itismaku/github/'
credentials {
username repsyUsername
password repsyPassword
}
}
}
}
}
20 changes: 1 addition & 19 deletions mommons-entityframework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,4 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.24'
implementation 'mysql:mysql-connector-java:8.0.30'

}

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}

repositories {
maven {
url 'https://repo.repsy.io/mvn/itismaku/github/'
credentials {
username repsyUsername
password repsyPassword
}
}
}
}
}
20 changes: 1 addition & 19 deletions mommons-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,4 @@ dependencies {
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'commons-io:commons-io:20030203.000550'
implementation 'mysql:mysql-connector-java:8.0.30'
}

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}

repositories {
maven {
url 'https://repo.repsy.io/mvn/itismaku/github/'
credentials {
username repsyUsername
password repsyPassword
}
}
}
}
}
20 changes: 1 addition & 19 deletions mommons-spigot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,4 @@ dependencies {
implementation 'commons-codec:commons-codec:1.9'
compileOnly 'com.mojang:authlib:1.5.21'
compileOnly 'com.gmail.filoghost.holographicdisplays:holographicdisplays-api:2.4.0'
}

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}

repositories {
maven {
url 'https://repo.repsy.io/mvn/itismaku/github/'
credentials {
username repsyUsername
password repsyPassword
}
}
}
}
}
18 changes: 0 additions & 18 deletions mommons-worker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,3 @@ dependencies {
implementation 'commons-io:commons-io:20030203.000550'
implementation 'commons-codec:commons-codec:1.9'
}

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}

repositories {
maven {
url 'https://repo.repsy.io/mvn/itismaku/github/'
credentials {
username repsyUsername
password repsyPassword
}
}
}
}

0 comments on commit 0ff4e08

Please sign in to comment.