2017-06-30 6 views
0

Dieses Projekt (Beispiel) hängt von einem Projekt ab, das im übergeordneten Verzeichnis definiert ist. Es ist überhaupt kein Teil des Builds des übergeordneten Verzeichnisprojekts. Gradle findet jedoch nie ein Projekt in einem meiner Ordner mit Projekten darin. Das übergeordnete Verzeichnis enthält ein Multiplattform-Multiprojekt-Bibliotheksprojekt für libGDX. Ich kann nicht rufen Projekt() und eine in einem beliebigen Verzeichnis finden, so weit ...

FAILURE: Build failed with an exception. 

    * Where: 
    Settings file '/home/athenacadence/git/gdx-complextext/example/settings.gradle' line: 2 

    * What went wrong: 
    A problem occurred evaluating settings 'example'. 
    > Project with path '/../html' could not be found. 

    * Try: 
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

    CONFIGURE FAILED 

    Total time: 0.124 secs 

GDX-complextext/example/settings.gradle

include 'desktop', 'android', 'ios', 'html', 'core', 'ios-moe' 
includeBuild(project("/../html")) 

GDX-complextext/build.gradle

ext { 
    GROUPID = 'com.athenaeumapps.gdxcomplextext' 
    VERSION = '0.0.1-SNAPSHOT' 

} 

buildscript { 
    repositories { 
     mavenCentral() 
     maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 
     jcenter() 
     maven { url uri(System.getenv("INTEL_MULTI_OS_ENGINE_HOME") + "/gradle") } 
    } 
    dependencies { 
     classpath 'com.goharsha:gwt-opentype:0.1-SNAPSHOT' 
    classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6' 
     classpath 'com.android.tools.build:gradle:2.1.3' 
     classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.2.0' 
     classpath group: 'org.multi-os-engine', name: 'moe-gradle', version: '1.1.+' 
    } 
} 

allprojects { 
    apply plugin: "eclipse" 

    ext { 
     appName = 'gdx-complextext' 
     gdxVersion = '1.9.6' 
     roboVMVersion = '2.2.0' 
    } 

    repositories { 
     mavenCentral() 
     mavenLocal() 
     maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 
     maven { url "https://oss.sonatype.org/content/repositories/releases/" } 
    } 

    group = GROUPID 
    version = VERSION 
} 

project(":android") { 
    configurations { 
     custom 
     compile.extendsFrom custom 
    } 

    eclipse { 
     project { 
      name = appName + "-android" 
     } 
    } 

    dependencies { 
     compile project(':core') 
     compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" 

    } 
} 


project(":core") { 
    apply plugin: 'java' 

    apply from: '../publish.gradle' 

    configurations { 
     custom 
     compile.extendsFrom custom 
    } 

    eclipse { 
     project { 
      name = appName + "-core" 
     } 
    } 

    dependencies { 
     compile "com.badlogicgames.gdx:gdx:$gdxVersion" 
    } 
} 




project(":desktop") { 
    apply plugin: 'java' 

    apply from: '../publish.gradle' 

    configurations { 
     custom 
     compile.extendsFrom custom 
    } 

    eclipse { 
     project { 
      name = appName + "-desktop" 
     } 
    } 

    dependencies { 
     compile project(':core') 
    } 
} 


project(":html") { 
    apply plugin: 'java' 


    apply from: '../publish.gradle' 

    configurations { 
     custom 
     compile.extendsFrom custom 
    } 

    eclipse { 
     project { 
      name = appName + "-html" 
     } 
    } 

    dependencies { 
     compile project(':core') 
    } 
    dependencies { 
     compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" 
     compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources" 
     compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" 
    } 
} 



project(":ios") { 
    apply plugin: 'java' 
    apply plugin: 'robovm' 

    apply from: '../publish.gradle' 

    configurations { 
     custom 
     compile.extendsFrom custom 
    } 

    eclipse { 
     project { 
      name = appName + "-ios" 
     } 
    } 

    dependencies { 

     compile project(':core') 

     compile "com.mobidevelop.robovm:robovm-rt:${roboVMVersion}" 
     compile "com.mobidevelop.robovm:robovm-cocoatouch:${roboVMVersion}" 
     compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" 

    } 
} 


project(":ios-moe") { 
    apply plugin: 'java' 
    apply plugin: 'moe' 


    apply from: '../publish.gradle' 

    configurations { 
     custom 
     compile.extendsFrom custom 
     natives 
    } 

    eclipse { 
     project { 
      name = appName + "-ios-moe" 
     } 
    } 

    dependencies { 

     compile project(':core') 

     compile "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion" 
     natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" 
    } 
} 

EDIT

Nach nur includeBuild versucht, erhalte ich dies:

includeBuild („$ {} rootProject.projectDir /../ html“)

+0

sein könnte albern, aber haben Sie mit einem '/' versucht endet: '../ html /'? – tinker

+0

Nicht albern überhaupt .. aber es wurde vergebens versucht. –

+0

Bitte seien Sie vorsichtiger mit Tags - diese Frage betrifft nicht das Projektmanagement. – EJoshuaS

Antwort

0

Bitte versuchen Sie einen anderen Weg zu verwenden, um einen Projektstandort zu erhalten rootProject.projectDir mit dann ../html hinzufügen, auch nach documentation gibt es keine Notwendigkeit in project z verwenden nur includeBuild wie unten:

includeBuild("${rootProject.projectDir}/../html") 

Ein weiteres Beispiel here gefunden werden kann

+0

Einstellungsdatei '/home/athenacadence/git/gdx-complextext/example/settings.gradle' Zeile: 2 Die Einstellungsdatei '/home/athenacadence/git/gdx-complextext/example/settings.gradle' konnte nicht kompiliert werden. Start fehlgeschlagen: Einstellungsdatei '/home/athenacadence/git/gdx-complextext/example/settings.gradle': 2: erwartet alles außer '' \ n ''; hab es trotzdem @ line 2, spalte 46. {rootProject.projectDir} /../ ') –

+0

Welche Version verwendest du? – webdizz

+0

Einstellungsdatei '/home/athenacadence/git/gdx-complextext/example/settings.gradle' line: 2 Beim Auswerten der Einstellungen ist ein Problem aufgetreten. Die Methode includeBuild() für Argumente [/home/athenacadence/git/gdx-complextext/example/../html] für das 'example' Beispiel des Typs org.gradle.initialization.DefaultSettings konnte nicht gefunden werden. –

Verwandte Themen