feat: update template
This commit is contained in:
parent
c5adeede0a
commit
a9143a6e9c
3 changed files with 53 additions and 12 deletions
63
build.gradle
63
build.gradle
|
@ -3,7 +3,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "https://files.minecraftforge.net/maven"
|
||||
url = "https://maven.minecraftforge.net/"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
|
@ -11,11 +11,17 @@ buildscript {
|
|||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
|
||||
changing = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
version = "1.0"
|
||||
group= "modgroup"
|
||||
|
@ -26,22 +32,57 @@ minecraft {
|
|||
runDir = "run"
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url = "https://maven.tilera.xyz" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
}
|
||||
|
||||
processResources
|
||||
{
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
filesMatching('mcmod.info') {
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'deobf'
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
publishing {
|
||||
tasks.publish.dependsOn 'build'
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifactId = project.archivesBaseName
|
||||
|
||||
artifact deobfJar
|
||||
artifact sourcesJar
|
||||
artifact jar
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
if (project.hasProperty('mvnURL')) {
|
||||
maven {
|
||||
credentials {
|
||||
username findProperty("mvnUsername")
|
||||
password findProperty("mvnPassword")
|
||||
}
|
||||
url = findProperty("mvnURL")
|
||||
}
|
||||
}
|
||||
else {
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
|
||||
|
|
0
gradlew
vendored
Normal file → Executable file
0
gradlew
vendored
Normal file → Executable file
Loading…
Reference in a new issue