|
@@ -1,42 +1,58 @@
|
|
|
buildscript {
|
|
|
repositories {
|
|
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
|
+ maven { url 'https://plugins.gradle.org/m2/' }
|
|
|
jcenter()
|
|
|
mavenCentral()
|
|
|
}
|
|
|
dependencies {
|
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
|
|
+ classpath 'gradle.plugin.com.matthewprenger:CurseGradle:1.2.0'
|
|
|
}
|
|
|
}
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
|
+apply plugin: 'com.matthewprenger.cursegradle'
|
|
|
|
|
|
-version = "${version_minecraft}-${version_mod}"
|
|
|
-group = "${mod_group}.${mod_id}"
|
|
|
+version = "${version_minecraft}-${mod_version}"
|
|
|
+group = "${mod_group}"
|
|
|
archivesBaseName = "${mod_id}"
|
|
|
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
|
|
|
|
|
minecraft {
|
|
|
- mappings channel: 'snapshot', version: '20180921-1.13'
|
|
|
-
|
|
|
+ mappings channel: 'snapshot', version: "${version_mcp}".toString()
|
|
|
+
|
|
|
runs {
|
|
|
- client = {
|
|
|
- properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
|
- properties 'forge.logging.console.level': 'debug'
|
|
|
- workingDirectory project.file('run').canonicalPath
|
|
|
- source sourceSets.main
|
|
|
+ client {
|
|
|
+ workingDirectory project.file('run')
|
|
|
+
|
|
|
+ property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
|
+ property 'forge.logging.console.level', 'debug'
|
|
|
+
|
|
|
+ mods {
|
|
|
+ cakechomps {
|
|
|
+ source sourceSets.main
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- server = {
|
|
|
- properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
|
- properties 'forge.logging.console.level': 'debug'
|
|
|
- workingDirectory project.file('run').canonicalPath
|
|
|
- source sourceSets.main
|
|
|
+
|
|
|
+ server {
|
|
|
+ workingDirectory project.file('run')
|
|
|
+
|
|
|
+ property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
|
+ property 'forge.logging.console.level', 'debug'
|
|
|
+
|
|
|
+ mods {
|
|
|
+ cakechomps {
|
|
|
+ source sourceSets.main
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
dependencies {
|
|
|
- minecraft 'net.minecraftforge:forge:1.13.2-25.0.10'
|
|
|
+ minecraft "net.minecraftforge:forge:${version_forge}"
|
|
|
}
|
|
|
|
|
|
sourceSets {
|
|
@@ -49,12 +65,44 @@ sourceSets {
|
|
|
|
|
|
jar {
|
|
|
manifest {
|
|
|
- attributes(["Specification-Title": "${archivesBaseName}",
|
|
|
- "Specification-Vendor": "C4",
|
|
|
- "Specification-Version": "24.0",
|
|
|
- "Implementation-Title": project.name,
|
|
|
+ attributes(["Specification-Title": "${mod_name}",
|
|
|
+ "Specification-Vendor": "${mod_author}",
|
|
|
+ "Specification-Version": "${version}",
|
|
|
+ "Implementation-Title": "${mod_name}",
|
|
|
"Implementation-Version": "${version}",
|
|
|
- "Implementation-Vendor" :"C4",
|
|
|
+ "Implementation-Vendor" :"${mod_author}",
|
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+task sourcesJar(type: Jar) {
|
|
|
+ classifier = 'sources'
|
|
|
+ from sourceSets.main.allJava
|
|
|
+}
|
|
|
+
|
|
|
+tasks.build.dependsOn sourcesJar
|
|
|
+
|
|
|
+processResources {
|
|
|
+
|
|
|
+ from(sourceSets.main.resources.srcDirs) {
|
|
|
+ include 'META-INF/mods.toml'
|
|
|
+ expand 'version': project.version, 'mod_id' : mod_id, 'mod_name': mod_name, 'mod_url': mod_url, 'mod_author': mod_author, 'mod_description': mod_description, 'mod_icon': mod_icon
|
|
|
+ }
|
|
|
+
|
|
|
+ from(sourceSets.main.resources.srcDirs) {
|
|
|
+ exclude 'META-INF/mods.toml'
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+curseforge {
|
|
|
+
|
|
|
+ project {
|
|
|
+ apiKey = findProperty('curseKey') ?: 0
|
|
|
+ id = "${curse_id}"
|
|
|
+ releaseType = "${curse_release}"
|
|
|
+ changelogType = 'markdown'
|
|
|
+ changelog = file('docs/CHANGELOG.md')
|
|
|
+ addArtifact(sourcesJar)
|
|
|
+ }
|
|
|
}
|