buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = '1.16.5-a1.1.1'
group = 'com.auriny.cospg' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'cosrpg'
java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8.
repositories {
maven {
url = "https://maven.theillusivec4.top/"
}
}
println('jdk: ' + System.getProperty('java.version') + ' jvm: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') arch: ' + System.getProperty('os.arch'))
minecraft {
mappings channel: 'snapshot', version: '20210309-1.16.5'
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
cosrpg {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
// The markers can be changed as needed.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'
// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'
mods {
cosrpg {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '--mod', 'cosrpg', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
cosrpg {
source sourceSets.main
}
}
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies {
implementation 'org.jetbrains:annotations:20.1.0'
minecraft 'net.minecraftforge:forge:1.16.5-36.2.34'
compileOnly "io.gitlab.hohserg.elegant.networking:annotation-processor:3.14" //для idea
annotationProcessor "io.gitlab.hohserg.elegant.networking:annotation-processor:3.14"
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.5-4.0.5.3")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.5-4.0.5.3:api")
}
jar {
manifest {
attributes([
"Specification-Title": "cosrpg",
"Specification-Vendor": "cosrpgareus",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"cosrpgmodsareus",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
jar.finalizedBy('reobfJar')
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}