ViaFabric/build.gradle

73 lines
1.8 KiB
Groovy
Raw Normal View History

2019-01-06 20:11:08 +01:00
import org.apache.tools.ant.filters.*
2018-08-23 19:06:08 +02:00
plugins {
2019-01-05 22:30:41 +01:00
id 'java'
2018-08-23 19:06:08 +02:00
id 'net.minecrell.licenser' version '0.4.1'
2019-01-05 22:30:41 +01:00
id 'fabric-loom' version '0.2.0-SNAPSHOT'
id 'com.palantir.git-version' version '0.12.0-rc2'
2018-08-23 19:06:08 +02:00
}
2019-01-05 22:30:41 +01:00
group 'com.github.creeper123123321.viafabric'
version gitVersion()
2019-01-05 22:30:41 +01:00
archivesBaseName = 'ViaFabric'
2018-07-06 04:49:19 +02:00
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
2018-12-21 20:40:07 +01:00
mavenLocal()
2018-07-06 04:49:19 +02:00
mavenCentral()
2019-01-05 22:30:41 +01:00
jcenter()
2018-08-22 19:23:09 +02:00
maven { url 'https://repo.viaversion.com/' }
2018-08-21 20:14:42 +02:00
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
2019-01-05 22:30:41 +01:00
maven { url 'https://maven.fabricmc.net/' }
2018-07-06 04:49:19 +02:00
}
2019-01-06 20:11:08 +01:00
processResources {
filter ReplaceTokens, tokens: [
"version": project.property("version")
]
}
2018-07-06 04:49:19 +02:00
configurations {
shade
compile.extendsFrom shade
}
dependencies {
shade('us.myles:viaversion:2.0.0-19w02a') {
2018-08-21 20:14:42 +02:00
transitive = false
changing = true
}
2019-01-05 22:30:41 +01:00
minecraft "com.mojang:minecraft:19w02a"
mappings "net.fabricmc:yarn:19w02a.12"
modCompile "net.fabricmc:fabric-loader:0.3.2.92"
2019-01-05 22:30:41 +01:00
// Fabric API. This is technically optional, but you probably want it anyway.
modCompile "net.fabricmc:fabric:0.1.4.71"
2018-07-06 04:49:19 +02:00
}
jar {
configurations.shade.each { dep ->
2019-01-05 22:30:41 +01:00
from(project.zipTree(dep)) {
2018-12-11 22:49:04 +01:00
//exclude 'META-INF', 'META-INF/**'
2018-07-06 04:49:19 +02:00
exclude 'us/myles/ViaVersion/SpongePlugin.class'
2019-01-02 18:52:08 +01:00
exclude 'us/viaversion/libs/javassist/**'
exclude 'mcmod.info'
2019-01-07 19:03:57 +01:00
exclude 'plugin.yml'
exclude 'bungee.yml'
2018-07-06 04:49:19 +02:00
}
}
}
minecraft {
}
2019-01-05 22:30:41 +01:00
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}