Skip to content

Commit

Permalink
Finishing conversion to gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Jul 4, 2024
1 parent a8a5267 commit 7964810
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 180 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,26 @@ buildNumber.properties

# Common working directory
run/

### GitHub example for gradle
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Movecraft CoreProtect Addon
![CoreProtect](https://github.com/TylerS1066/Movecraft-CoreProtect/actions/workflows/maven.yml/badge.svg)
![CoreProtect](https://github.com/APDevTeam/Movecraft-CoreProtect/actions/workflows/maven.yml/badge.svg)

Home of the code for the following features:
- CoreProtect logging support
Expand All @@ -8,7 +8,7 @@ Home of the code for the following features:
The `main` branch is coded for 1.14.4 to 1.18.1 and Movecraft 8.x.

## Download
Devevlopment builds can be found on the [GitHub Actions tab](https://github.com/TylerS1066/Movecraft-CoreProtect/actions) of this repository.
Devevlopment builds can be found on the [GitHub Actions tab](https://github.com/APDevTeam/Movecraft-CoreProtect/actions) of this repository.

Stable builds can be found on [our SpigotMC page](TBD).

Expand All @@ -23,7 +23,7 @@ Jars are located in `/target`.


## Support
[Github Issues](https://github.com/TylerS1066/Movecraft-CoreProtect/issues)
[Github Issues](https://github.com/APDevTeam/Movecraft-CoreProtect/issues)

[Discord](http://bit.ly/JoinAP-Dev)

Expand Down
78 changes: 42 additions & 36 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,56 +1,62 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
`java-library`
`maven-publish`
id("io.github.0ffz.github-packages") version "1.2.1"
}

repositories {
gradlePluginPortal()
mavenLocal()
maven {
url = uri("https://maven.pkg.github.com/APDevTeam/Movecraft")
}

maven {
url = uri("https://repo.maven.apache.org/maven2/")
}

maven {
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}

maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
}

maven {
url = uri("https://maven.playpro.com")
}
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
githubPackage("apdevteam/movecraft")
maven("https://maven.playpro.com")
}

dependencies {
compileOnly(libs.org.spigotmc.spigot.api)
compileOnly(libs.net.countercraft.movecraft)
compileOnly(libs.net.coreprotect.coreprotect)
api("org.jetbrains:annotations-java5:24.1.0")
compileOnly("io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT")
compileOnly("net.countercraft:movecraft:+")
compileOnly("net.coreprotect:coreprotect:22.4")
}

group = "net.countercraft.movecraft.coreprotect"
version = "1.0.0_beta-1"
version = "1.0.0_beta-1_gradle"
description = "Movecraft-CoreProtect"
java.sourceCompatibility = JavaVersion.VERSION_13
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

tasks.jar {
archiveBaseName.set("Movecraft-CoreProtect")
archiveClassifier.set("")
archiveVersion.set("")

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
tasks.processResources {
from(rootProject.file("LICENSE.md"))
filesMatching("*.yml") {
expand(mapOf("projectVersion" to project.version))
}
}

tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "net.countercraft.movecraft.coreprotect"
artifactId = "movecraft-coreprotect"
version = "${project.version}"

artifact(tasks.jar)
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/apdevteam/movecraft-coreprotect")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
12 changes: 0 additions & 12 deletions gradle/libs.versions.toml

This file was deleted.

Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Empty file modified gradlew
100644 → 100755
Empty file.
111 changes: 0 additions & 111 deletions pom.xml

This file was deleted.

4 changes: 0 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
/*
* This file was generated by the Gradle 'init' task.
*/

rootProject.name = "Movecraft-CoreProtect"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.countercraft.movecraft.coreprotect.movecraftcoreprotect;
package net.countercraft.movecraft.coreprotect;

public class Config {
public static boolean LOG_INTERACTIONS = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.countercraft.movecraft.coreprotect.movecraftcoreprotect;
package net.countercraft.movecraft.coreprotect;

import net.coreprotect.CoreProtect;
import net.coreprotect.CoreProtectAPI;
import net.countercraft.movecraft.coreprotect.movecraftcoreprotect.listeners.CraftDetectListener;
import net.countercraft.movecraft.coreprotect.movecraftcoreprotect.listeners.CraftReleaseListener;
import net.countercraft.movecraft.coreprotect.listeners.CraftDetectListener;
import net.countercraft.movecraft.coreprotect.listeners.CraftReleaseListener;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.countercraft.movecraft.coreprotect.movecraftcoreprotect.listeners;
package net.countercraft.movecraft.coreprotect.listeners;

import net.coreprotect.CoreProtectAPI;
import net.countercraft.movecraft.MovecraftLocation;
import net.countercraft.movecraft.coreprotect.movecraftcoreprotect.Config;
import net.countercraft.movecraft.coreprotect.movecraftcoreprotect.MovecraftCoreProtect;
import net.countercraft.movecraft.coreprotect.Config;
import net.countercraft.movecraft.coreprotect.MovecraftCoreProtect;
import net.countercraft.movecraft.craft.PilotedCraft;
import net.countercraft.movecraft.craft.type.CraftType;
import net.countercraft.movecraft.events.CraftDetectEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.countercraft.movecraft.coreprotect.movecraftcoreprotect.listeners;
package net.countercraft.movecraft.coreprotect.listeners;

import net.coreprotect.CoreProtectAPI;
import net.countercraft.movecraft.MovecraftLocation;
import net.countercraft.movecraft.coreprotect.movecraftcoreprotect.Config;
import net.countercraft.movecraft.coreprotect.movecraftcoreprotect.MovecraftCoreProtect;
import net.countercraft.movecraft.coreprotect.Config;
import net.countercraft.movecraft.coreprotect.MovecraftCoreProtect;
import net.countercraft.movecraft.craft.PilotedCraft;
import net.countercraft.movecraft.craft.type.CraftType;
import net.countercraft.movecraft.events.CraftReleaseEvent;
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Movecraft-CoreProtect
version: '${project.version}'
main: net.countercraft.movecraft.coreprotect.movecraftcoreprotect.MovecraftCoreProtect
api-version: 1.14
version: ${projectVersion}
main: net.countercraft.movecraft.coreprotect.MovecraftCoreProtect
api-version: 1.18
depend: [ Movecraft, CoreProtect ]
authors: [ TylerS1066 ]
description: Movecraft Integration with CoreProtect
website: https://github.com/TylerS1066/Movecraft-CoreProtect
website: https://github.com/APDevTeam/Movecraft-CoreProtect

0 comments on commit 7964810

Please sign in to comment.