123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- buildscript {
- repositories {
- maven { url = 'https://files.minecraftforge.net/maven' }
- maven { url = 'https://maven.blamejared.com' }
- mavenCentral()
- }
- dependencies {
- classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
- classpath group: 'com.blamejared', name: 'ModTemplate', version: '1.+', changing: true
- }
- }
- plugins {
- id "com.matthewprenger.cursegradle" version "1.4.0"
- }
- apply plugin: 'net.minecraftforge.gradle'
- apply plugin: 'com.blamejared.modtemplate'
- apply plugin: 'eclipse'
- apply plugin: 'maven-publish'
- version = '7.0.0'
- group = 'com.blamejared.controlling'
- archivesBaseName = 'Controlling'
- sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
- minecraft {
- mappings channel: 'snapshot', version: '20201028-1.16.3'
- accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
- runs {
- client {
- workingDirectory project.file('run')
- taskName 'ControllingClient'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- taskName 'ControllingServer'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- }
- }
- modTemplate {
- mcVersion "1.16.5"
- curseHomepage "https://www.curseforge.com/minecraft/mc-mods/controlling"
- displayName "Controlling"
- changelog {
- enabled true
- firstCommit "efff217f353e51ce43751caf94b1924818b710e8"
- repo "https://github.com/jaredlll08/Controlling"
- }
- versionTracker {
- enabled true
- author "Jared"
- projectName "controlling"
- }
- webhook {
- enabled true
- curseId "250398"
- avatarUrl "https://media.forgecdn.net/avatars/49/603/636079972364045115.png"
- }
- }
- dependencies {
- minecraft 'net.minecraftforge:forge:1.16.5-36.0.0'
- }
- jar {
- manifest {
- attributes([
- "Specification-Title" : "controlling",
- "Specification-Vendor" : "BlameJared",
- "Specification-Version" : "1",
- "Implementation-Title" : project.name,
- "Implementation-Version" : "${version}",
- "Implementation-Vendor" : "controlling",
- "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
- }
- }
- task sourcesJar(type: Jar, dependsOn: classes) {
- description = 'Creates a JAR containing the source code.'
- from sourceSets.main.allSource
- classifier = 'sources'
- }
- task javadocJar(type: Jar, dependsOn: javadoc) {
- description = 'Creates a JAR containing the JavaDocs.'
- from javadoc.destinationDir
- classifier = 'javadoc'
- }
- task deobfJar(type: Jar) {
- description = 'Creates a JAR containing the non-obfuscated compiled code.'
- from sourceSets.main.output
- classifier = "deobf"
- }
- artifacts {
- archives sourcesJar
- archives javadocJar
- archives deobfJar
- }
- publish.dependsOn(project.tasks.getByName("assemble"))
- publish.mustRunAfter(project.tasks.getByName("build"))
- publishing {
- publications {
- mavenJava(MavenPublication) {
- groupId project.group
- artifactId project.archivesBaseName
- version project.version
- from components.java
- // Allows the maven pom file to be modified.
- pom.withXml {
- // Go through all the dependencies.
- asNode().dependencies.dependency.each { dep ->
- println 'Surpressing artifact ' + dep.artifactId.last().value().last() + ' from maven dependencies.'
- assert dep.parent().remove(dep)
- }
- }
- artifact sourcesJar {
- classifier 'sources'
- }
- artifact javadocJar {
- classifier 'javadoc'
- }
- artifact deobfJar {
- classifier 'deobf'
- }
- }
- }
- repositories {
- maven {
- url "file://" + System.getenv("local_maven")
- }
- }
- }
- curseforge {
- apiKey = findProperty('curseforge_api_token') ?: 0
- project {
- id = "250398"
- releaseType = 'release'
- changelog = file("changelog.md")
- changelogType = 'markdown'
- // addArtifact(sourcesJar)
- // addArtifact(javadocJar)
- addArtifact(deobfJar)
- }
- }
|