Skip to content

Commit

Permalink
Added MYSQL-driver
Browse files Browse the repository at this point in the history
  • Loading branch information
BrainStone committed Apr 20, 2017
1 parent a8bb57f commit 5a74c40
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id "org.spongepowered.plugin" version "0.8.1"
id "com.github.johnrengelman.shadow" version "1.2.4"
}

apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "maven"
apply plugin: "maven-publish"
apply plugin: "com.github.johnrengelman.shadow"

def getChangelog() {
Pattern pattern = Pattern.compile("^.+?\n-+\n\n((?:- .+?\n)+)");
Expand Down Expand Up @@ -88,6 +90,7 @@ repositories {

dependencies {
compile "org.spongepowered:spongeapi:${sponge_version}"
runtime "mysql:mysql-connector-java:${msql_jdbc_version}"
}

sponge {
Expand Down Expand Up @@ -162,11 +165,27 @@ task processSources (type: Copy) {
}

jar {
classifier = "dev"

doLast {
signJar(jar)
}
}

shadowJar {
classifier = null

dependencies {
include dependency("mysql:mysql-connector-java")
}

relocate "com.mysql", "${project.group}.shadow.mysql"

doLast {
signJar(shadowJar)
}
}

task sourceJar (type: Jar, dependsOn: processSources) {
classifier = "sources"
from processSources.outputs
Expand All @@ -179,6 +198,7 @@ task sourceJar (type: Jar, dependsOn: processSources) {

artifacts {
archives jar
archives shadowJar
archives sourceJar
}

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ org.gradle.jvmargs=-Xmx1G

plugin_version_postfix=alpha
sponge_version=6.0.0-SNAPSHOT

msql_jdbc_version=6.0.6

0 comments on commit 5a74c40

Please sign in to comment.