mirror of
https://github.com/barkeser2002/Not-Enough-Crashes.git
synced 2026-09-25 02:20:04 +03:00
105 lines
2.3 KiB
Groovy
105 lines
2.3 KiB
Groovy
plugins {
|
|
id 'fabric-loom'
|
|
id 'maven-publish'
|
|
id "com.jfrog.bintray"
|
|
id 'com.matthewprenger.cursegradle'
|
|
}
|
|
|
|
ext {
|
|
githubUrl = "https://github.com/$github_repo"
|
|
replaceProperties = new Properties()
|
|
File propertiesFile = new File('gradle.properties')
|
|
propertiesFile.withInputStream {
|
|
replaceProperties.load(it)
|
|
}
|
|
|
|
pomConfig = {
|
|
licenses {
|
|
license {
|
|
name project.license
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id "fudge"
|
|
name "natan"
|
|
email "natandestroyer100@gmail.com"
|
|
}
|
|
}
|
|
|
|
scm {
|
|
url githubUrl
|
|
}
|
|
}
|
|
}
|
|
|
|
def setupMod(String total_version, String template_key) {
|
|
// def total_version = "$mod_version+$minecraft_version"
|
|
|
|
|
|
group maven_group
|
|
|
|
project.replaceProperties.put(template_key, total_version)
|
|
}
|
|
|
|
task updateTemplate(type: Copy) {
|
|
group = "template"
|
|
description = "Switches out variables like \$total_version in .template.md files, and copies the results into .md files."
|
|
from(rootDir)
|
|
include("**/*.template.md")
|
|
filesMatching("**/*.template.md") {
|
|
def extensionLength = ".template.md".length()
|
|
|
|
name = sourceName.substring(0, sourceName.length() - extensionLength) + ".md"
|
|
expand(replaceProperties)
|
|
}
|
|
destinationDir = rootDir
|
|
}
|
|
|
|
|
|
allprojects {
|
|
apply plugin: "fabric-loom"
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: "com.jfrog.bintray"
|
|
apply plugin: 'com.matthewprenger.cursegradle'
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
|
|
group maven_group
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:$minecraft_version"
|
|
mappings "net.fabricmc:yarn:$minecraft_version+$yarn_mappings:v2"
|
|
modImplementation "net.fabricmc:fabric-loader:$loader_version"
|
|
}
|
|
|
|
processResources {
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
|
|
inputs.property "version", project.version
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
archiveClassifier = "sources"
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = "UTF-8"
|
|
}
|
|
jar {
|
|
from "LICENSE"
|
|
}
|
|
|
|
bintrayUpload.dependsOn updateTemplate
|
|
}
|
|
|
|
|
|
|
|
|
|
|