Skip to content

Commit 6ad00be

Browse files
authored
Merge pull request #39 from AzisabaNetwork/chore/move-gradle
Gradleへの移行
2 parents f7d61ec + e15c5bc commit 6ad00be

File tree

11 files changed

+484
-236
lines changed

11 files changed

+484
-236
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,14 @@ jobs:
2525
with:
2626
distribution: "adopt"
2727
java-version: "17"
28-
cache: "maven"
2928

30-
- name: Java version
31-
run: java -version
29+
- name: Setup Gradle
30+
uses: gradle/actions/setup-gradle@v4
3231

33-
- name: Check maven version
34-
run: mvn --version
35-
36-
- name: Build
37-
run: mvn -B package
32+
- name: Build with Gradle
33+
run: ./gradlew build
3834

3935
- name: Upload a Build Artifact
4036
uses: actions/[email protected]
4137
with:
42-
path: target/
38+
path: build/libs/

.gitignore

Lines changed: 41 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,62 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/gradle,intellij
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=gradle,intellij
13

2-
# Created by https://www.gitignore.io/api/maven,eclipse
3-
# Edit at https://www.gitignore.io/?templates=maven,eclipse
4+
### Intellij ###
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
47

5-
### Eclipse ###
6-
.metadata
7-
bin/
8-
tmp/
9-
*.tmp
10-
*.bak
11-
*.swp
12-
*~.nib
13-
local.properties
14-
.settings/
15-
.loadpath
16-
.recommenders
17-
18-
# External tool builders
19-
.externalToolBuilders/
20-
21-
# Locally stored "Eclipse launch configurations"
22-
*.launch
8+
# User-specific stuff
9+
.idea/
2310

24-
# PyDev specific (Python IDE for Eclipse)
25-
*.pydevproject
11+
# CMake
12+
cmake-build-*/
2613

27-
# CDT-specific (C/C++ Development Tooling)
28-
.cproject
14+
# File-based project format
15+
*.iws
2916

30-
# CDT- autotools
31-
.autotools
17+
# IntelliJ
18+
out/
3219

33-
# Java annotation processor (APT)
34-
.factorypath
20+
# mpeltonen/sbt-idea plugin
21+
.idea_modules/
3522

36-
# PDT-specific (PHP Development Tools)
37-
.buildpath
23+
# JIRA plugin
24+
atlassian-ide-plugin.xml
3825

39-
# sbteclipse plugin
40-
.target
26+
# Cursive Clojure plugin
27+
.idea/replstate.xml
4128

42-
# Tern plugin
43-
.tern-project
29+
# Crashlytics plugin (for Android Studio and IntelliJ)
30+
com_crashlytics_export_strings.xml
31+
crashlytics.properties
32+
crashlytics-build.properties
33+
fabric.properties
4434

45-
# TeXlipse plugin
46-
.texlipse
35+
### Gradle ###
36+
.gradle
37+
**/build/
38+
!src/**/build/
4739

48-
# STS (Spring Tool Suite)
49-
.springBeans
40+
# Ignore Gradle GUI config
41+
gradle-app.setting
5042

51-
# Code Recommenders
52-
.recommenders/
43+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
44+
!gradle-wrapper.jar
5345

54-
# Annotation Processing
55-
.apt_generated/
46+
# Avoid ignore Gradle wrappper properties
47+
!gradle-wrapper.properties
5648

57-
# Scala IDE specific (Scala & Java development for Eclipse)
58-
.cache-main
59-
.scala_dependencies
60-
.worksheet
49+
# Cache of project
50+
.gradletasknamecache
6151

62-
### Eclipse Patch ###
52+
# Eclipse Gradle plugin generated files
6353
# Eclipse Core
6454
.project
65-
6655
# JDT-specific (Eclipse Java Development Tools)
6756
.classpath
6857

69-
# Annotation Processing
70-
.apt_generated
58+
### Gradle Patch ###
59+
# Java heap dump
60+
*.hprof
7161

72-
.sts4-cache/
73-
74-
### Maven ###
75-
target/
76-
pom.xml.tag
77-
pom.xml.releaseBackup
78-
pom.xml.versionsBackup
79-
pom.xml.next
80-
release.properties
81-
dependency-reduced-pom.xml
82-
buildNumber.properties
83-
.mvn/timing.properties
84-
.mvn/wrapper/maven-wrapper.jar
85-
86-
# End of https://www.gitignore.io/api/maven,eclipse
87-
88-
.idea/
89-
*.iml
62+
# End of https://www.toptal.com/developers/gitignore/api/gradle,intellij

build.gradle.kts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
plugins {
2+
`java-library`
3+
alias(libs.plugins.lombok)
4+
}
5+
6+
val group by properties
7+
val version by properties
8+
description = "KDStatusReloaded"
9+
10+
val defaultEncoding: String = "UTF-8"
11+
java.sourceCompatibility = JavaVersion.VERSION_17
12+
13+
repositories {
14+
mavenLocal()
15+
mavenCentral()
16+
maven {
17+
name = "SpigotMC maven"
18+
url = uri("https://hub.spigotmc.org/nexus/content/groups/public/")
19+
}
20+
21+
maven {
22+
name = "Rayzr522 maven"
23+
url = uri("https://raw.githubusercontent.com/Rayzr522/maven-repo/master/")
24+
}
25+
}
26+
27+
dependencies {
28+
// Project tools
29+
compileOnly(libs.org.jetbrains.annotations)
30+
31+
// Database
32+
implementation(libs.com.mysql.mysql.connector.j)
33+
implementation(libs.com.zaxxer.hikaricp)
34+
35+
// Plugin dependencies
36+
compileOnly(libs.org.spigotmc.spigot.api)
37+
implementation(libs.me.rayzr522.jsonmessage)
38+
39+
// For testing
40+
testImplementation(libs.org.junit.jupiter.junit.jupiter)
41+
}
42+
43+
tasks.withType<JavaCompile> {
44+
options.encoding = defaultEncoding
45+
}
46+
47+
tasks.withType<Javadoc> {
48+
options.encoding = defaultEncoding
49+
}

gradle.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
3+
org.gradle.jvmargs=-Xmx2G
4+
org.gradle.parallel=true
5+
6+
org.gradle.configuration-cache=true
7+
8+
name=KDStatusReloaded
9+
group=net.azisaba.lgw
10+
version=1.6.2

gradle/libs.versions.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[versions]
2+
# Plugins
3+
lombok = "8.11"
4+
5+
# Project tools
6+
junit-jupiter = "5.11.3"
7+
jetbrains-annotations = "26.0.1"
8+
9+
# Database
10+
hikaricp = "4.0.3"
11+
com-mysql-mysql-connector-j = "9.1.0"
12+
13+
# Plugin dependencies
14+
spigot-api = "1.16.5-R0.1-SNAPSHOT"
15+
jsonmessage = "1.3.1"
16+
17+
[plugins]
18+
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
19+
20+
[libraries]
21+
com-mysql-mysql-connector-j = { module = "com.mysql:mysql-connector-j", version.ref = "com-mysql-mysql-connector-j" }
22+
com-zaxxer-hikaricp = { module = "com.zaxxer:HikariCP", version.ref = "hikaricp" }
23+
me-rayzr522-jsonmessage = { module = "me.rayzr522:jsonmessage", version.ref = "jsonmessage" }
24+
org-jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrains-annotations" }
25+
org-junit-jupiter-junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
26+
org-spigotmc-spigot-api = { module = "org.spigotmc:spigot-api", version.ref = "spigot-api" }

gradle/wrapper/gradle-wrapper.jar

42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)