Skip to content

Commit

Permalink
Configure project
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlgo committed Jul 21, 2023
1 parent 3636373 commit 7b9874d
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 24 deletions.
59 changes: 53 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
plugins {
id 'java'
id "java"
id "org.jetbrains.kotlin.jvm" version "1.9.0"
id "com.github.johnrengelman.shadow" version "7.1.2"
}

group = 'dev.mikchan.mcnp'
version = '0.0.1'
if (hasProperty("buildScan")) {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}

static def determineVersion(String defaultVersion) {
def envVersion = System.getenv("VERSION")
return envVersion == null ? defaultVersion : envVersion
}

group = "dev.mikchan.mcnp"
version = determineVersion("0.0.1")

repositories {
mavenCentral()

maven {
name = "spigotmc-repo"
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}

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

maven {
name = "aikar"
url = "https://repo.aikar.co/content/groups/aikar/"
}
}

dependencies {
compileOnly "org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT"
compileOnly "org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT"

implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.0"

implementation "co.aikar:acf-paper:0.5.1-SNAPSHOT"
shadow "co.aikar:acf-paper:0.5.1-SNAPSHOT"
}

def targetJavaVersion = 17
Expand All @@ -40,8 +66,29 @@ tasks.withType(JavaCompile).configureEach {
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
filteringCharset "UTF-8"
filesMatching("plugin.yml") {
expand props
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}

shadowJar {
archiveClassifier.set(null)

dependencies {
include(dependency("co.aikar:acf-paper"))
}

relocate "co.aikar.commands", "dev.mikchan.mcns.utility.shadow.co.aikar.commands"
relocate "co.aikar.locales", "dev.mikchan.mcns.utility.shadow.co.aikar.locales"
}
1 change: 1 addition & 0 deletions encoder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
2 changes: 1 addition & 1 deletion encoder/bad_apple.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np

# ffmpeg -i [input] -filter:v fps=fps=20 %0d.bmp
DATA_PATH = "D:\\BadApple"
DATA_PATH = ""
IDEAL_HEIGHT = 20
IDEAL_WIDTH = round(20 / 1080 * 1440)

Expand Down
2 changes: 2 additions & 0 deletions encoder/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy==1.25.1
opencv-python==4.8.0.74
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
17 changes: 0 additions & 17 deletions src/main/java/dev/mikchan/mcnp/badapple/MikChanNoBadApple.java

This file was deleted.

14 changes: 14 additions & 0 deletions src/main/java/dev/mikchan/mcnp/badapple/MikChanNoBadApple.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package dev.mikchan.mcnp.badapple

import org.bukkit.plugin.java.JavaPlugin

@Suppress("unused")
class MikChanNoBadApple : JavaPlugin() {
override fun onEnable() {
logger.info("Plugin has started")
}

override fun onDisable() {
logger.info("Bye!")
}
}
9 changes: 9 additions & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
name: MikChanNoBadApple
version: '${version}'

authors: [ 'George Endo (MikChan / wtlgo)' ]
description: Plays Bad Apple animation in the chat
website: https://github.com/BadApple

prefix: MCnBadApple
main: dev.mikchan.mcnp.badapple.MikChanNoBadApple
api-version: '1.20'

libraries:
- org.jetbrains.kotlin:kotlin-stdlib:1.9.0

0 comments on commit 7b9874d

Please sign in to comment.