Skip to content
Permalink
Browse files

Initial build script changes for piston

  • Loading branch information
DarkArc committed Jan 1, 2020
1 parent 5cb4101 commit 9db3d052db9c8599656211b03be9c098aa0980d2
Showing with 95 additions and 93 deletions.
  1. +95 −93 build.gradle
@@ -44,117 +44,119 @@ if (!project.hasProperty("gitCommitHash")) {
}
}

allprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.jfrog.artifactory'

group = pluginGroup
version = pluginVersion
ext.internalVersion = version + ";" + gitCommitHash

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven {
name = 'sk89q-repo'
url = 'http://maven.sk89q.com/repo/'
}
maven {
name = 'Destroystokyo Repo'
url = 'https://repo.destroystokyo.com/repository/maven-public/'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.jfrog.artifactory'

group = pluginGroup
version = pluginVersion
ext.internalVersion = version + ";" + gitCommitHash

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven {
name = 'sk89q-repo'
url = 'http://maven.sk89q.com/repo/'
}

dependencies {
compile 'com.destroystokyo.paper:paper-api:1.15.1-R0.1-SNAPSHOT'
compile 'com.sk89q.worldedit:worldedit-core:7.1.0-SNAPSHOT'
compile 'com.sk89q.worldedit:worldedit-bukkit:7.1.0-SNAPSHOT'
compile 'org.enginehub.jinglenote:jinglenote-core:1.0.0-SNAPSHOT'
compile 'org.enginehub.jinglenote:jinglenote-bukkit:1.0.0-SNAPSHOT'
compile 'com.zachsthings.libcomponents:libcomponents-bukkit:1.3.0-SNAPSHOT'
compile 'net.sf.opencsv:opencsv:2.0'

testCompile group: 'junit', name: 'junit', version: '4.12'
maven {
name = 'Destroystokyo Repo'
url = 'https://repo.destroystokyo.com/repository/maven-public/'
}
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
dependencies {
compile 'com.destroystokyo.paper:paper-api:1.15.1-R0.1-SNAPSHOT'
compile 'com.sk89q.worldedit:worldedit-core:7.1.0-SNAPSHOT'
compile 'com.sk89q.worldedit:worldedit-bukkit:7.1.0-SNAPSHOT'
compile 'org.enginehub.jinglenote:jinglenote-core:1.0.0-SNAPSHOT'
compile 'org.enginehub.jinglenote:jinglenote-bukkit:1.0.0-SNAPSHOT'
compile 'com.zachsthings.libcomponents:libcomponents-bukkit:1.3.0-SNAPSHOT'
compile 'net.sf.opencsv:opencsv:2.0'

compileOnly 'com.sk89q.worldedit.worldedit-libs:ap:7.1.0-SNAPSHOT'
annotationProcessor 'com.sk89q.worldedit.worldedit-libs:ap:7.1.0-SNAPSHOT'
annotationProcessor "com.google.guava:guava:21.0"

testCompile group: 'junit', name: 'junit', version: '4.12'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives shadowJar
archives sourcesJar
archives javadocJar
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives shadowJar
archives sourcesJar
archives javadocJar
}

build.dependsOn(sourcesJar)
build.dependsOn(javadocJar)
build.dependsOn(sourcesJar)
build.dependsOn(javadocJar)

jar {
manifest {
attributes("Class-Path": "CommandBook/WorldEdit.jar lib/WorldEdit.jar ../lib/WorldEdit.jar ../WorldEdit.jar",
"WorldEdit-Version": version)
}
jar {
manifest {
attributes("Class-Path": "CommandBook/WorldEdit.jar lib/WorldEdit.jar ../lib/WorldEdit.jar ../WorldEdit.jar",
"WorldEdit-Version": version)
}
}

shadowJar {
classifier 'dist'
shadowJar {
classifier 'dist'

dependencies {
include(dependency('net.sf.opencsv:opencsv'))
include(dependency('com.zachsthings.libcomponents:libcomponents-bukkit'))
relocate ("org.enginehub.jinglenote", "com.sk89q.commandbook.enginehub.jinglenote") {
include(dependency("org.enginehub.jinglenote:jinglenote-core"))
include(dependency("org.enginehub.jinglenote:jinglenote-bukkit"))
}
dependencies {
include(dependency('net.sf.opencsv:opencsv'))
include(dependency('com.zachsthings.libcomponents:libcomponents-bukkit'))
relocate ("org.enginehub.jinglenote", "com.sk89q.commandbook.enginehub.jinglenote") {
include(dependency("org.enginehub.jinglenote:jinglenote-core"))
include(dependency("org.enginehub.jinglenote:jinglenote-bukkit"))
}

exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
}

artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = project.version.contains("SNAPSHOT") ? 'libs-snapshot-local' : 'libs-release-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
}

}
}
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = project.version.contains("SNAPSHOT") ? 'libs-snapshot-local' : 'libs-release-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true

resolve {
repository {
repoKey = 'repo'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}

processResources {
from (sourceSets.main.resources.srcDirs) {
expand 'internalVersion': project.internalVersion
include 'plugin.yml'
resolve {
repository {
repoKey = 'repo'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}

from (sourceSets.main.resources.srcDirs) {
exclude 'plugin.yml'
}
processResources {
from (sourceSets.main.resources.srcDirs) {
expand 'internalVersion': project.internalVersion
include 'plugin.yml'
}
}

from (sourceSets.main.resources.srcDirs) {
exclude 'plugin.yml'
}
}

0 comments on commit 9db3d05

Please sign in to comment.
You can’t perform that action at this time.