java - Project 'mymodule' not found in root project 'mymodule' -


i configured gradle project builds submodules when run ./gradlew build , goes flawless. when move subdirectory , run submodule ./gradlew :mymodule:build error

project 'mymodule' not found in root project 'mymodule'. 

my grade root config:

group 'com.example.core' version '1.0-snapshot'  allprojects {     apply plugin: 'java'      version = '1.0' }  subprojects {     repositories {         mavenlocal()     }      dependencymanagement {         imports {             mavenbom "org.springframework.boot:spring-boot-dependencies:${spring_boot_version}"         }     }      dependencies {         compile 'org.springframework.boot:spring-boot-starter-web'     } }  project(':mymodule1') {     apply plugin: 'application'      bootrepackage {         mainclass = 'com.example.app'     }      springboot {         mainclass = 'com.example.app'         executable = true         buildinfo()     }      bootrun {         addresources = false     }      task stage(dependson: 'bootrepackage') {     }      dependencies {         compile project(':mymodule2')     }  }  project(':mymodule2') {     apply plugin: 'application'     // config module }  sourcecompatibility = 1.8 targetcompatibility = 1.8  buildscript {     repositories {         // repos     }     dependencies {         // deps     } }   defaulttasks 'bootrun'  repositories {     mavencentral() }  clean {     delete "target" }  task cleanresources(type: delete) {     delete 'build/resources' }  task wrapper(type: wrapper) {     gradleversion = '4.0' }  bootrepackage.enabled = false 

and have empty module's config in submodule:

group 'com.example.proj' version '1.0-snapshot' 

i suggest reason in missing of run configuration submodule. question how point submodule's build.gralde use parent's configurations?

needless move subdirectory, juste run ./gradlew :mymodule:build root directory.

the :mymodule prefix indicates want run specified task (here build) target subproject (here mymodule)


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -