Skip to content

Commit

Permalink
Kotlin is no longer shaded with dependencies, it's shaded to a differ…
Browse files Browse the repository at this point in the history
…ent jar
  • Loading branch information
joserobjr committed Oct 22, 2016
1 parent 57a0696 commit 99b3adc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
2 changes: 2 additions & 0 deletions BukkitPlugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ processResources {
exclude 'plugin.yml'
}
}

shadowJar.enabled = false
32 changes: 18 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ allprojects {
group 'br.com.gamemods.kotlinfun'
version '0.2-SNAPSHOT'

apply plugin: 'kotlin'

repositories {
mavenCentral()
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://hub.spigotmc.org/nexus/content/groups/public/' }
}

dependencies {
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile group: 'junit', name: 'junit', version: '4.11'
}
}

buildscript {
Expand All @@ -23,16 +30,6 @@ buildscript {
}
}

apply plugin: 'kotlin'

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

subprojects {
apply plugin: 'kotlin'
apply plugin: 'com.github.johnrengelman.shadow'
Expand All @@ -44,11 +41,7 @@ subprojects {
}

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-runtime:$kotlin_version"
compile rootProject
testCompile group: 'junit', name: 'junit', version: '4.11'
}

shadowJar {
Expand All @@ -60,15 +53,25 @@ subprojects {
}

classifier = null
baseName = rootProject.name+'-'+project.name
}

build.finalizedBy shadowJar

task copyFinalJar(type: Copy) {
from "${project.buildDir}/libs/${shadowJar.archiveName}"
into "${rootProject.buildDir}"
}

shadowJar.finalizedBy(copyFinalJar)
}

project(':BungeeChat') {
dependencies {
compile 'net.md-5:bungeecord-chat:1.10-SNAPSHOT'
}

shadowJar.enabled = false
}

project(':UniversalPlugin') {
Expand All @@ -80,6 +83,7 @@ project(':UniversalPlugin') {
shadowJar {
dependencies {
include project(':BungeePlugin')
include project(':BukkitPlugin')
include project(':SpigotPlugin')
}
}
Expand Down

0 comments on commit 99b3adc

Please sign in to comment.