I'm doing an android library project. The library project has compile some 3rd party library such as Volley. When user use the library, user need to compile the volley too. If user do not compile, the app of user will not find the volley code. But I don't want to the user compile volley library, just compile my library. Is there a solution to solve???
There is my library gradle
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
consumerProguardFiles 'proguard-rules.pro'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.squareup:seismic:1.0.1'
compile 'com.android.volley:volley:1.0.0'
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.android.support:recyclerview-v7:23.0.1"
compile "com.android.support:support-v4:23.0.1"
compile "com.android.support:support-annotations:23.0.1"
compile "com.android.support:design:23.0.1"
}
There is a sample app gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 108
versionName "3.1"
}
signingConfigs {
debug {
storeFile file("debug.jks")
storePassword 'develop'
keyAlias "develop"
keyPassword "develop"
}
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
minifyEnabled false
shrinkResources false
signingConfig signingConfigs.debug
}
}
lintOptions {
disable 'MissingTranslation'
abortOnError false
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
}
dependencies {
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'org.jsoup:jsoup:1.10.2'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'com.getkeepsafe.taptargetview:taptargetview:1.8.0'
compile 'com.squareup:seismic:1.0.1'<<<<<<<<<<<<<<<<<<<< I need to hide this
compile 'com.android.volley:volley:1.0.0'<<<<<<<<<<<<<<< I need to hide this
compile project(':mylibrary')
}