Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
677d6e6
1. migrate to gradle from maven
dark0ghost Jan 23, 2022
46782f8
return file: config.xml & plugin.xml
dark0ghost Jan 23, 2022
c8a1ca1
optimize import
dark0ghost Jan 23, 2022
2fece43
rewrite code in MainConfig
dark0ghost Jan 23, 2022
45fc902
fix stringWithPlayersNames: added NotNull or exception
dark0ghost Jan 23, 2022
d06faea
added annotation for experimental api
dark0ghost Jan 23, 2022
e52d7e7
migrate text from code to Text object
dark0ghost Jan 23, 2022
c5d1e33
Create gradle-publish.yml
dark0ghost Jan 23, 2022
0e37cba
Create gradle.yml
dark0ghost Jan 23, 2022
45c8e94
Merge pull request #1 from dark0ghost/beta
dark0ghost Jan 23, 2022
0e43748
migrate text from code to Text obj and remove if-else -> if-return
Jan 23, 2022
94199a6
fix gradle settings
Jan 23, 2022
0c0e7b8
remove build from git
Jan 23, 2022
6cf1de3
fix gradle settings
Jan 23, 2022
35d3965
add gradle-wrapper.jar
Jan 23, 2022
82d1828
Merge pull request #2 from dark0ghost/beta
dark0ghost Jan 23, 2022
0dc1d80
del main.kt: unused
Jan 23, 2022
226607d
Merge branch 'master' of https://github.com/dark0ghost/DonationExecutor
Jan 23, 2022
b5877d4
del main.kt: unused
Jan 23, 2022
5eadf20
del main.kt: unused
Jan 23, 2022
54bb86f
added plugin: [200~maven-publish~
Jan 23, 2022
28b8879
added plugin: maven-publish
Jan 23, 2022
f41f615
added plugin: maven-publish
Jan 23, 2022
c734d62
added plugin: maven-publish
Jan 23, 2022
3f8ebae
fix url publish
Jan 23, 2022
b56ff5e
sync MainConfig
Jan 23, 2022
7124332
sync DonationAlerts
Jan 23, 2022
57d3116
fix name
Jan 23, 2022
21cf35d
rename dir to org.dark0ghost.configs & org.dark0ghost.annotations
dark0ghost Jan 23, 2022
7b7ca23
optimaze code, issues #15: https://github.com/link1107/DonationExecut…
dark0ghost Jan 24, 2022
0eec80d
fix style code
dark0ghost Jan 24, 2022
338685b
change annotattion on method DonationAlerts::getConnected Deprecated …
dark0ghost Jan 24, 2022
e5c0f86
add block try-cath-finnaly
dark0ghost Jan 24, 2022
a5b37a1
change e.printStackTrace(); to System.err.println(e.getMessage()); is…
dark0ghost Jan 24, 2022
375f7a2
add lombok:1.18.22 for auto gen setter/getter and add Unit test for c…
dark0ghost Jan 24, 2022
467a7fa
Merge pull request #3 from dark0ghost/beta
dark0ghost Jan 24, 2022
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
45 changes: 45 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Gradle
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: build

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: build
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ out/
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
Expand Down Expand Up @@ -111,3 +110,10 @@ buildNumber.properties

# Common working directory
run/

#gradle
.gradle
*.jar
!gradle/wrapper/gradle-wrapper.jar
build

75 changes: 75 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.6.10"
id 'java'
id 'java-library'
id 'maven-publish'
}

group 'igorlink'
version '1.18'

repositories {
mavenCentral()
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'

content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
maven {
url = 'https://papermc.io/repo/repository/maven-public/'
}
}

jar {
archiveBaseName = 'DonationExecutor'
archiveVersion = '1.0-SNAPSHOT'
}

dependencies {
implementation fileTree(
dir: 'libs',
include: ['*.jar']
)
implementation "org.jetbrains.kotlin:kotlin-stdlib"

implementation "io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT"
implementation 'io.socket:engine.io-client:2.0.0'
implementation 'io.socket:socket.io-client:2.0.1'
implementation "org.json:json:20190722"

compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
}

test {
useJUnitPlatform()
}

publishing {
repositories {
maven {
name = "OSSRH"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "GitHubPackages"
def username_github = System.getenv("USERNAME")
url = "https://maven.pkg.github.com/$username_github/DonationExecutor"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.code.style=official
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
185 changes: 185 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading