From f68a58c231f46815bf0836b8516295081602e0e5 Mon Sep 17 00:00:00 2001 From: joserobjr Date: Fri, 21 Oct 2016 05:14:02 -0300 Subject: [PATCH] Moved spigot's functions to it's own module --- BukkitPlugin/build.gradle | 12 ------- SpigotPlugin/build.gradle | 14 ++++++++ .../com/gamemods/kotlinfun/spigot}/spigot.kt | 3 +- build.gradle | 36 +++++-------------- settings.gradle | 2 +- 5 files changed, 25 insertions(+), 42 deletions(-) create mode 100644 SpigotPlugin/build.gradle rename {BukkitPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/bukkit => SpigotPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/spigot}/spigot.kt (94%) diff --git a/BukkitPlugin/build.gradle b/BukkitPlugin/build.gradle index 3bfba67..3861a5b 100644 --- a/BukkitPlugin/build.gradle +++ b/BukkitPlugin/build.gradle @@ -1,17 +1,5 @@ -repositories { - maven { url = bukkit_repo } -} - dependencies { compile 'org.bukkit:bukkit:1.10.2-R0.1-SNAPSHOT' - compile project(':BungeeChat') -} - - -shadowJar { - dependencies { - include project(':BungeeChat') - } } processResources { diff --git a/SpigotPlugin/build.gradle b/SpigotPlugin/build.gradle new file mode 100644 index 0000000..538cfb0 --- /dev/null +++ b/SpigotPlugin/build.gradle @@ -0,0 +1,14 @@ +dependencies { + compile 'org.spigotmc:spigot-api:1.10.2-R0.1-SNAPSHOT' + compile project(':BungeeChat') + compile(project(':BukkitPlugin')) { + exclude module:'bukkit' + } +} + +shadowJar { + dependencies { + include project(':BungeeChat') + include project(':BukkitPlugin') + } +} diff --git a/BukkitPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/bukkit/spigot.kt b/SpigotPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/spigot/spigot.kt similarity index 94% rename from BukkitPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/bukkit/spigot.kt rename to SpigotPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/spigot/spigot.kt index 9cca7a8..ebda4b8 100644 --- a/BukkitPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/bukkit/spigot.kt +++ b/SpigotPlugin/src/main/kotlin/br/com/gamemods/kotlinfun/spigot/spigot.kt @@ -1,6 +1,7 @@ @file:JvmName("SpigotUtil") -package br.com.gamemods.kotlinfun.bukkit +package br.com.gamemods.kotlinfun.spigot +import br.com.gamemods.kotlinfun.bukkit.Colorized import br.com.gamemods.kotlinfun.bungee.ComponentArray import net.md_5.bungee.api.ChatColor import net.md_5.bungee.api.chat.* diff --git a/build.gradle b/build.gradle index 5aac650..8ebd103 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,16 @@ allprojects { group 'br.com.gamemods.kotlinfun' version '0.2-SNAPSHOT' + + repositories { + mavenCentral() + maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' } + maven { url = 'https://hub.spigotmc.org/nexus/content/groups/public/' } + } } buildscript { ext.kotlin_version = '1.0.3' - ext.bukkit_repo = 'https://hub.spigotmc.org/nexus/content/groups/public/' repositories { mavenCentral() @@ -20,10 +25,6 @@ buildscript { apply plugin: 'kotlin' -repositories { - mavenCentral() -} - dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } @@ -42,11 +43,6 @@ subprojects { options.encoding = 'UTF-8' } - repositories { - mavenCentral() - maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' } - } - dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" @@ -55,16 +51,6 @@ subprojects { testCompile group: 'junit', name: 'junit', version: '4.11' } - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - /* - jar { - baseName = "KotlinFun-${project.name}" - } - */ - shadowJar { dependencies { include dependency("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") @@ -74,8 +60,6 @@ subprojects { } classifier = null - // baseName = "KotlinFun-${project.name}" - // relocate 'kotlin', 'br.com.gamemods.kotlinfun.kotlin' } build.finalizedBy shadowJar @@ -88,19 +72,15 @@ project(':BungeeChat') { } project(':UniversalPlugin') { - repositories { - maven { url = bukkit_repo } - } - dependencies { compile project(':BungeePlugin') - compile project(':BukkitPlugin') + compile project(':SpigotPlugin') } shadowJar { dependencies { include project(':BungeePlugin') - include project(':BukkitPlugin') + include project(':SpigotPlugin') } } } diff --git a/settings.gradle b/settings.gradle index 95066e8..5b62c20 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ rootProject.name = 'KotlinFun' -include 'BukkitPlugin', 'BungeePlugin', 'BungeeChat', 'UniversalPlugin' +include 'BukkitPlugin', 'BungeePlugin', 'SpigotPlugin', 'BungeeChat', 'UniversalPlugin'