-1

I have created a library ,when I am importing it , the external dependencies mentioned in the gradle file are not getting detected like recyclerview ,cameraview etc. The library is already uploaded to jitpack and not detecting the external dependencies which are in build gradle Here is my build gradle of the library

apply plugin:  'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.r00786'
ext {
    PUBLISH_GROUP_ID = 'com.github'
    PUBLISH_ARTIFACT_ID = 'r00786'
    PUBLISH_VERSION = '1.8'
}

android {
    compileSdkVersion 27
    defaultConfig {

        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {

        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:support-v4:27.1.1'
    testImplementation 'junit:junit:4.12'
    implementation 'com.wonderkiln:camerakit:0.13.1'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
     implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    api("com.github.bumptech.glide:glide:4.6.1") {
        exclude group: "com.android.support"
    }



}


// build a jar with source files
task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}

task javadoc(type: Javadoc) {
    failOnError  false
    source = android.sourceSets.main.java.sourceFiles
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    classpath += configurations.compile
}

// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

artifacts {
    archives sourcesJar
    archives javadocJar
}



// Top-level build file where you can add configuration options common to all sub-projects/modules.

//project level build gradle

buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Rohit Sharma
  • 1,384
  • 12
  • 19

1 Answers1

1

It is the bug of the maven plugin version 1.5 make it 2.0 it will work fine

  classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
Rohit Sharma
  • 1,384
  • 12
  • 19