Gradle module with source, can't find module

I would like to add a module with source into an Android project. I followed the guide on creating a , Java Library. I get an error when i try to add the git library a module with source into my project.

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not find any version that matches com.demo:util.

Can anyone tell me exactly what needs to be in the library so that this works. I have another library done by a different developer, when i use that library project it works but i cant figure exactly why it does work.

Here is the build.gradle of the demo library

plugins {
    // Apply the java-library plugin to add support for Java Library
    id 'java-library'

version = '0.1.0'
group = 'com.demo'

repositories {
    // Use jcenter for resolving dependencies.
    // You can declare any Maven/Ivy/file repository here.

dependencies {
    // This dependency is exported to consumers, that is to say found on their compile classpath.
    api 'org.apache.commons:commons-math3:3.6.1'

    // This dependency is used internally, and not exposed to consumers on their own compile classpath.
    implementation ''

    // Use JUnit test framework
    testImplementation 'junit:junit:4.12'

jar {
    manifest {
                    'Implementation-Version': project.version)

and this is the settings.gradle of the test app

include ':app''Library Demo'

sourceControl {

and the the build.gradle

dependencies {