Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
./gradle/wrapper/gradle-wrapper.properties и поменяй версию gradle до 4.9.1, кажется, это последняя с которой работает обычный forgegradle.Билд-скрипт(build.gradle) покажиа если использовать forgegradle то вот такая ошибка при сборкеПосмотреть вложение 13873
plugins {
id "com.jfrog.bintray" version "1.8.4"
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
group = 'com.anatawa12.forge'
if (project.hasProperty("push_release")) {
version = '1.2-1.0.0'
} else {
version = '1.2-1.0.0-SNAPSHOT'
}
archivesBaseName = 'ForgeGradle'
targetCompatibility = '1.6'
sourceCompatibility = '1.6'
repositories {
mavenLocal()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
// because Srg2Source needs an eclipse dependency.
name = "eclipse"
url = "https://repo.eclipse.org/content/groups/eclipse/"
}
maven {
// because SpecialSource doesnt have a full release
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
mavenCentral()
maven {
name = "mojang"
url = "https://libraries.minecraft.net/"
}
}
jar {
manifest {
attributes 'version': project.version, 'javaCompliance': project.targetCompatibility
attributes 'group': project.group
attributes 'Implementation-Version': project.version + getGitHash()
}
}
configurations {
deployerJars
compileOnly
}
dependencies {
compile gradleApi()
// moved to the beginning to be the overrider
compile 'org.ow2.asm:asm-debug-all:5.0.3'
compile 'com.google.guava:guava:18.0'
compile 'net.sf.opencsv:opencsv:2.3' // reading CSVs.. also used by SpecialSource
compile 'com.cloudbees:diff4j:1.1' // for difing and patching
compile 'com.github.abrarsyed.jastyle:jAstyle:1.2' // formatting
compile 'net.sf.trove4j:trove4j:2.1.0' // because its awesome.
compile 'com.github.jponge:lzma-java:1.3' // replaces the LZMA binary
compile 'com.nothome:javaxdelta:2.0.1' // GDIFF implementation for BinPatches
compile 'com.google.code.gson:gson:2.2.4' // Used instead of Argo for buuilding changelog.
compile 'com.github.tony19:named-regexp:0.2.3' // 1.7 Named regexp features
compile 'net.md-5:SpecialSource:1.7.3' // deobf and reobs
// because curse
compile 'org.apache.httpcomponents:httpclient:4.3.3'
compile 'org.apache.httpcomponents:httpmime:4.3.3'
// mcp stuff
compile 'de.oceanlabs.mcp:RetroGuard:3.6.6'
compile 'de.oceanlabs.mcp:mcinjector:3.2-SNAPSHOT'
compile 'net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT'
// stupid maven
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
//Stuff used in the GradleStart classes
compileOnly 'com.mojang:authlib:1.5.16'
compileOnly "net.minecraft:launchwrapper:1.11"
testCompile 'junit:junit:4.+'
}
compileJava {
options.deprecation = true
//options.compilerArgs += ["-Werror", "-Xlint:unchecked"]
}
javadoc {
classpath += configurations.compileOnly
// linked javadoc urls.. why not...
options.addStringOption 'link', 'https://gradle.org/docs/current/javadoc/'
options.addStringOption 'link', 'http://docs.guava-libraries.googlecode.com/git-history/v18.0/javadoc'
options.addStringOption 'link', 'http://asm.ow2.org/asm50/javadoc/user/'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc
classifier = "javadoc"
}
artifacts {
archives jar
archives javadocJar
}
test {
if (project.hasProperty("filesmaven")) // disable this test when on the forge jenkins
{
exclude "**/ExtensionMcpMappingTest*"
exclude "**/ExtensionForgeVersionTest*"
}
}
publishing {
publications {
bintray(MavenPublication) {
from components.java
artifact javadocJar
pom {
name = project.archivesBaseName
description = 'Gradle plugin for Forge'
url = 'https://github.com/MinecraftForge/ForgeGradle'
scm {
url = 'https://github.com/anatawa12/ForgeGradle'
connection = 'scm:git:git://github.com/anatawa12/ForgeGradle.git'
developerConnection = 'scm:git:git@github.com:anatawa12/ForgeGradle.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/anatawa12/ForgeGradle/issues'
}
licenses {
license {
name = 'Lesser GNU Public License, Version 2.1'
url = 'https://www.gnu.org/licenses/lgpl-2.1.html'
distribution = 'repo'
}
}
developers {
developer {
id = 'AbrarSyed'
name = 'Abrar Syed'
roles = ['developer']
}
developer {
id = 'LexManos'
name = 'Lex Manos'
roles = ['developer']
}
developer {
id = 'anatawa12'
name = 'anatawa12'
roles = ['developer']
}
}
}
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = "$buildDir/repos/releases"
def snapshotsRepoUrl = "$buildDir/repos/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
if (project.hasProperty("push_release")) {
bintray {
user = project.hasProperty("BINTRAY_USER") ? BINTRAY_USER : ""
key = project.hasProperty("BINTRAY_KEY") ? BINTRAY_KEY : ""
publications = ["bintray"]
pkg {
repo = "maven"
name = group + "." + project.name
licenses = ["LGPL-2.1"]
websiteUrl = "https://github.com/anatawa12/ForgeGradle/"
issueTrackerUrl = "https://github.com/anatawa12/ForgeGradle/issues"
vcsUrl = "https://github.com/anatawa12/ForgeGradle.git"
publicDownloadNumbers = true
version {
name = project.version
}
}
}
}
bintrayUpload.dependsOn assemble
// write out version so its convenient for doc deployment
file('build').mkdirs()
file('build/version.txt').text = version;
def getGitHash() {
def process = 'git rev-parse --short HEAD'.execute()
process.waitFor()
return '-' + (process.exitValue() ? 'unknown' : process.text.trim())
}
Либо юзаешь декларативный plugins id, либо императивный apply plugin. Вместе их не надоJava:plugins { id "com.jfrog.bintray" version "1.8.4" } apply plugin: 'java' apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'maven-publish' ...
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "https://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
changing = true
}
}
}
apply plugin: 'forge'
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}
dependencies {
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
Starting Gradle Daemon...
Gradle Daemon started in 3 s 691 ms
> Configure project :
#################################################
ForgeGradle 1.2-1.0.7-0a7c06e
https://github.com/anatawa12/ForgeGradle-1.2
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
The minecraft forge's official maven repository has been moved to
https://maven.minecraftforge.net/. Currently redirection from previous location
previous location to new location is alive but we don't know
when it will stop so I especially recommend to change repository url.
BUILD SUCCESSFUL in 42s
Could not resolve: :forgeBin:1.7.10-10.13.4.1614-1.7.10
Could not resolve: :forgeBin:1.7.10-10.13.4.1614-1.7