mirror of
https://github.com/barkeser2002/Tenet.git
synced 2026-09-25 02:59:59 +03:00
183 lines
6.1 KiB
Groovy
183 lines
6.1 KiB
Groovy
import groovy.json.JsonSlurper
|
|
|
|
buildscript {
|
|
repositories {
|
|
maven {
|
|
name 'forge'
|
|
url 'https://maven.minecraftforge.net/'
|
|
}
|
|
maven {
|
|
name 'sonatype'
|
|
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
|
}
|
|
maven {
|
|
name 'spigot'
|
|
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
|
|
}
|
|
maven {
|
|
name = "juanmuscaria"
|
|
url = "https://github.com/juanmuscaria/maven/raw/master"
|
|
}
|
|
gradlePluginPortal()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.anatawa12.forge:ForgeGradle:1.2-1.1.0'
|
|
classpath 'io.github.cruciblemc:CrucibleGradle:1.1-SNAPSHOT'
|
|
classpath("org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:4.1.1")
|
|
}
|
|
}
|
|
|
|
apply plugin: 'base'
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: 'crucible'
|
|
apply plugin: 'java'
|
|
apply plugin: 'org.ajoberstar.grgit'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven {
|
|
name = "juanmuscaria"
|
|
url = "https://github.com/juanmuscaria/maven/raw/master"
|
|
}
|
|
maven {
|
|
name 'thermos'
|
|
url 'https://github.com/juanmuscaria/maven/raw/master/ThermosLibs'
|
|
}
|
|
maven {
|
|
name 'sonatype'
|
|
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
|
}
|
|
maven { url 'https://maven.mohistmc.com/' }
|
|
maven {
|
|
name 'forge'
|
|
url 'https://maven.minecraftforge.net/'
|
|
}
|
|
maven {
|
|
name 'minecraft'
|
|
url 'https://libraries.minecraft.net/'
|
|
}
|
|
maven {
|
|
name 'spigot'
|
|
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
|
|
}
|
|
|
|
mavenCentral()
|
|
}
|
|
|
|
minecraft {
|
|
version = '1.7.10'
|
|
mcpVersion = '9.05'
|
|
mainClass = 'cpw.mods.fml.relauncher.ServerLaunchWrapper'
|
|
tweakClass = 'cpw.mods.fml.common.launcher.FMLTweaker'
|
|
installerVersion = "1.4"
|
|
srgExtra "PK: org/bukkit/craftbukkit org/bukkit/craftbukkit/v1_7_R4"
|
|
|
|
// Repos used on the generated subprojects
|
|
repos = [
|
|
'https://github.com/juanmuscaria/maven/raw/master/ThermosLibs',
|
|
'https://github.com/juanmuscaria/maven/raw/master',
|
|
'https://maven.minecraftforge.net/',
|
|
'https://oss.sonatype.org/content/repositories/snapshots/',
|
|
'https://libraries.minecraft.net/'
|
|
]
|
|
}
|
|
|
|
group = 'com.mohistmc'
|
|
|
|
ext.mcVersion = "1.7.10"
|
|
ext.forgeVersion = "10.13.4.1614"
|
|
version = '1.7.10-' + grgit.head().abbreviatedId
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
|
options.warnings = false // Shutup deprecated for removal warnings
|
|
}
|
|
|
|
configurations {
|
|
libraries
|
|
}
|
|
|
|
dependencies {
|
|
libraries 'net.minecraft:launchwrapper:1.12@jar'
|
|
libraries 'org.ow2.asm:asm-all:5.0.3'
|
|
libraries 'com.typesafe.akka:akka-actor_2.11:2.3.3'
|
|
libraries 'com.typesafe:config:1.2.1'
|
|
libraries 'org.scala-lang:scala-actors-migration_2.11:1.1.0'
|
|
libraries 'org.scala-lang:scala-compiler:2.11.7'
|
|
libraries 'org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2'
|
|
libraries 'org.scala-lang.plugins:scala-continuations-plugin_2.11.2:1.0.2'
|
|
libraries 'org.scala-lang:scala-library:2.11.7'
|
|
libraries 'org.scala-lang:scala-parser-combinators:2.11.0-M4'
|
|
libraries 'org.scala-lang:scala-reflect:2.11.7'
|
|
libraries 'org.scala-lang:scala-swing:2.11.0-M7'
|
|
libraries 'org.scala-lang:scala-xml:2.11.0-M4'
|
|
libraries 'net.sf.jopt-simple:jopt-simple:5.0.1'
|
|
libraries 'lzma:lzma:0.0.1'
|
|
libraries 'org.yaml:snakeyaml:1.9'
|
|
libraries 'commons-lang:commons-lang:2.6'
|
|
libraries 'org.avaje:ebean:2.7.3'
|
|
libraries 'jline:jline:2.6'
|
|
libraries 'net.md-5:SpecialSource:1.7.4'
|
|
libraries 'com.googlecode.json-simple:json-simple:1.1'
|
|
libraries 'org.xerial:sqlite-jdbc:3.7.2'
|
|
libraries 'mysql:mysql-connector-java:5.1.14'//
|
|
libraries 'javax.persistence:persistence-api:1.0.2'
|
|
libraries 'org.apache.httpcomponents:httpclient:4.4.1'
|
|
libraries 'pw.prok:KImagine:0.2.0@jar'
|
|
libraries 'net.openhft:affinity:3.0.1'
|
|
libraries 'org.fusesource.jansi:jansi:1.11'
|
|
libraries 'java3d:vecmath:1.3.1'
|
|
libraries 'com.koloboke:koloboke-impl-jdk8:1.0.0'
|
|
libraries 'org.apache.logging.log4j:log4j-core:2.17.0'
|
|
}
|
|
|
|
packageServer {
|
|
manifest {
|
|
attributes([
|
|
'Implementation-Vendor' : 'MohistMC',
|
|
'Implementation-Title' : project.name,
|
|
'Implementation-Version': project.version,
|
|
'Specification-Vendor' : 'Bukkit Team',
|
|
'Specification-Title' : 'Bukkit',
|
|
'Specification-Version' : '1.7.10-R0.1-SNAPSHOT',
|
|
'Forge-Version' : '10.13.4.1614',
|
|
'TweakClass' : 'cpw.mods.fml.common.launcher.FMLTweaker',
|
|
'Main-Class' : 'com.mohistmc.MohistMC',
|
|
'Class-Path' : generateClasspath()
|
|
])
|
|
}
|
|
dependsOn("packageLibraries")
|
|
}
|
|
|
|
// TODO: Move this into the gradle plugin, generate md5 as well
|
|
tasks.register('packageLibraries', Zip) {
|
|
archiveFileName = 'libraries.zip'
|
|
destinationDirectory = file("$buildDir/distributions")
|
|
outputs.upToDateWhen {
|
|
false // TODO: Not 100% sure how to make this task re-run when libraries are changed...
|
|
}
|
|
|
|
configurations.libraries.resolvedConfiguration.resolvedArtifacts.collect {
|
|
def moduleVersion = it.moduleVersion
|
|
from (it.file) {
|
|
into ("${moduleVersion.id.group.replace('.', '/')}/${moduleVersion.id.name}/${moduleVersion.id.version}/")
|
|
}
|
|
}
|
|
|
|
group('crucible')
|
|
}
|
|
|
|
def generateClasspath(boolean legacy = false) {
|
|
def classpath = ''
|
|
configurations.libraries.resolvedConfiguration.resolvedArtifacts.collect { it.moduleVersion.id }.each {
|
|
def jar = "${it.group.replace('.', '/')}/${it.name}/${it.version}/${it.name}-${it.version}.jar"
|
|
classpath += " libraries/${jar}"
|
|
}
|
|
classpath += " libraries/net/minecraft/server/1.7.10/server-1.7.10.jar"
|
|
return classpath.trim()
|
|
}
|
|
|