Composite Build: No matching configuration was found?

Hi all,

I’m building a Java library project ('lib) for a Java app (‘app’).

‘app’ was an ant project but I created a gradle wrapper for it.

(app/build.gradle)

ant.importBuild 'build.xml'
...

and when I tried to include app as an included build in lib:

lib/build.gradle:

...
dependencies {
    implementation project(':app')
...
}

lib/settings.gradle:

rootProject.name = 'lib'
include '../app'

gradle build outputs:

Could not determine the dependencies of task ':compileJava'.
> Could not resolve all task dependencies for configuration ':compileClasspath'.
   > Could not resolve project :app.
     Required by:
         project :
      > No matching configuration of project :app was found. The consumer was configured to find an API of a library compatible with Java 11, preferably in the form of class files, and its dependencies declared externally but:
          - None of the consumable configurations have attributes.

Alternatively, I tried to include the module of app directly and gradle would the try to find the module on maven:

lib/build.gradle:

dependencies {
  implementation 'app:components:abc'
}

output:

Execution failed for task ':extractIncludeProto'.
> Could not resolve all files for configuration ':compileProtoPath'.
   > Could not find Orbit37:Components:AclBase.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/app/components/abc/components-abc.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :

I think mavenCentral() as a repository in lib/build.gradle causes this problem? How do I override it?

Thanks,
Shawn