Monday 15 June 2015

android - Publishing AAR to maven -


I am publishing aar file to Meran. I've successfully uploaded everything but when I add dependencies to the sample project of my library then the source files are not from my project.

This is build.gradle my library

  Apply plugin: 'com.android.library' android {compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig {minSdkVersion 14 targetSdkVersion 21 Snskrnkod 1 Snskrnnam "1.0"} buildTypes {release {minifyEnabled true proguardFiles getDefaultProguardFile ( 'proguard-android.txt)'), 'Proguard- rules.pro'}}} dependence {compil fileTree (dir: 'libs', it include: [ '* .jar']) compilation 'com.android.support:appcompat-v7:21.0.3' // volley compilation 'com.mcxiaoke.volley: Library: 1.0.14' // gson compile 'com .google.code.gson: gson: 2.3.1 '}  

here is my project build.gradle

  // top-level build file H Yes You can add configuration options com Apply plugins to all sub-projects / modules: 'com.android.library' buildscript {repositories {mavenCentral () jcenter ()} dependency {classpath 'com.android.tools.build:gradle : 1.1.2 '// Note: Do not keep your app dependencies here; They are in different modules build.gradle files}} All projects {repositories {mavenCentral () jcenter ()}} Android {compileSdkVersion 21 buildTools version "21.1.2" SourceSet {Main {manifest.srcFile 'app / src / main} / AndroidManifest.xml 'java.srcDirs = [compiled' app / src / main / java / com / ebrick / testspot ']}}} {dependency file file (direct:' lib ', including: [' *. jar ']) compilation' Com.android.support:appcompat- v7: 21.0.3 '// volley compilation' com.mcxiaoke.volley: Library: 1.0.14 '// gson compile' com.google.code.gson: Please apply with GSN: 2.3.1 '}:' maven_push.gradle ' 

If I use the project build.gradle If I remove sourceSet, then I get an error, AndroidManifest.xml is not found.

Changing the version number has solved my problem.


No comments:

Post a Comment