mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 11:39:14 +00:00
Merge pull request #9 from GTNewHorizons/update-gradle
fix(gradle): fix gradle wrapper script and plugins
This commit is contained in:
3 files changed
+67
-71
No files matched your search
+66
-70
@@ -2,33 +2,49 @@ buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
name = "gt"
|
||||
url = "https://gregtech.overminddl1.com/"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
maven {
|
||||
name = "jitpack.io"
|
||||
url = "https://jitpack.io"
|
||||
}
|
||||
maven {
|
||||
name = 'ajoberstar-backup'
|
||||
url = 'https://ajoberstar.org/bintray-backup/'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
classpath 'org.ajoberstar:gradle-git:0.10.1'
|
||||
classpath 'com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.matthewprenger.cursegradle' version '1.0.3'
|
||||
// project.grgit is not available and the repository we're working in is not
|
||||
// interacted with:
|
||||
id 'org.ajoberstar.grgit' version '4.0.2' apply false
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
// An explicit import is necessary because the plugin was not applied:
|
||||
import org.ajoberstar.grgit.Grgit
|
||||
|
||||
def repo = Grgit.open(project.file('.'))
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'signing'
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
def repo = Grgit.open()
|
||||
project.ext.gitHash = repo.log().find().abbreviatedId
|
||||
def branchname = repo.branch.getCurrent().fullName
|
||||
if (branchname.contains('HEAD')) {
|
||||
@@ -60,27 +76,34 @@ configurations {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'Chicken Bones Repo'
|
||||
url "http://chickenbones.net/maven/"
|
||||
}
|
||||
maven {
|
||||
name = "gt"
|
||||
url = "https://gregtech.overminddl1.com/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name 'Prof Mobius Repo'
|
||||
url "http://mobiusstrip.eu/maven"
|
||||
}
|
||||
name 'Chicken Bones Repo'
|
||||
url "http://chickenbones.net/maven/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name 'Prof Mobius Repo'
|
||||
url "http://mobiusstrip.eu/maven"
|
||||
}
|
||||
|
||||
maven {
|
||||
name 'Chisel Repo'
|
||||
url "http://maven.tterrag.com/"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//compile "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
|
||||
compile "codechicken:CodeChickenLib:${minecraft_version}-${ccl_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${ccc_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||
compile "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
|
||||
compile "codechicken:CodeChickenLib:${minecraft_version}-${ccl_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${ccc_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||
compile "codechicken:ForgeMultipart:${minecraft_version}-${fmp_version}:dev"
|
||||
compile "com.pahimar.ee3:EquivalentExchange3:1.7.10-0.3.505:dev"
|
||||
|
||||
@@ -89,33 +112,32 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
processResources
|
||||
{
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
processResources {
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
||||
}
|
||||
// replace version and mcversion
|
||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
configurations.shade.each { dep ->
|
||||
from(project.zipTree(dep)){
|
||||
exclude 'META-INF', 'META-INF/**', '*.info'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
manifest {
|
||||
attributes 'FMLAT': 'chisel_compile_at.cfg'
|
||||
}
|
||||
@@ -131,7 +153,7 @@ task deobfJar(type: Jar) {
|
||||
task apiJar(type: Jar) {
|
||||
from sourceSets.main.allSource
|
||||
from sourceSets.main.output
|
||||
include 'com/cricketcraft/chisel/api/**/*'
|
||||
include 'com/cricketcraft/chisel/api/**/*'
|
||||
classifier = 'api'
|
||||
}
|
||||
|
||||
@@ -196,31 +218,5 @@ String getChangelogText() {
|
||||
return str
|
||||
}
|
||||
|
||||
tasks.curseforge.dependsOn 'reobf'
|
||||
tasks.curseforge.enabled = !dev && project.hasProperty('curseforge_key')
|
||||
|
||||
curseforge {
|
||||
if (project.hasProperty('curseforge_key')) {
|
||||
apiKey = project.curseforge_key
|
||||
}
|
||||
|
||||
project {
|
||||
id = project.projectId
|
||||
changelog = System.getenv('CHANGELOG') == null || System.getenv('CHANGELOG').equals('none') ? getChangelogText() : System.getenv('CHANGELOG')
|
||||
changelogType = 'html'
|
||||
releaseType = 'release'
|
||||
relations {
|
||||
embeddedLibrary 'ctmlib'
|
||||
}
|
||||
mainArtifact(jar) {
|
||||
displayName = "Chisel - ${version}"
|
||||
}
|
||||
addArtifact deobfJar
|
||||
addArtifact sourcesJar
|
||||
addArtifact(apiJar) {
|
||||
relations {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
idea { module { inheritOutputDirs = true } }
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
|
||||
Reference in new issue
Block a user