Giter Club home page Giter Club logo

aarlinksources's Introduction

This plugin in deprecated. AndroidStudio 1.4 has this support built in.

Android Arsenal

AARLinkSources Plugin

The AARLinkSources Plugin is designed to attach sources for .aar dependencies in AndroidStudio.

Setup

buildscript {
    repositories {
        maven { url 'https://raw.github.com/xujiaao/mvn-repository/master/releases' }
    }

    dependencies {
        classpath 'com.github.xujiaao:aarLinkSources:1.0.0'
    }
}

Usage

apply plugin: 'aar-link-sources'

aarlinksources's People

Contributors

johnjohndoe avatar wondercsabo avatar xujiaao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aarlinksources's Issues

Example for debug mode

Hi could you add a section in your README.md for how to turn on debug mode. That would be great. Thank you

AS 0.8.9 fails with NoClassDefFoundError: ShortTypeHandling

I'm running into the following error when I apply README's Setup and Usage code:

Error:java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling
> org/codehaus/groovy/runtime/typehandling/ShortTypeHandling

My build environment is as follows:

Android Studio:
0.8.9

gradle-wrapper.properties:
distributionUrl=http://services.gradle.org/distributions/gradle-1.12-all.zip

build.gradle:

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

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://raw.github.com/xujiaao/mvn-repository/master/releases'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.2'
        classpath 'com.github.xujiaao:aarLinkSources:1.0.0'

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

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://oss.sonatype.org/content/groups/public'
        }
        maven {
            url 'https://raw.github.com/xujiaao/mvn-repository/master/releases'
        }
    }
}

Module's build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'aar-link-sources'

android {
    compileSdkVersion 21
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.xyz.testbed"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.android.support:support-v4:21.+'
    aarLinkSources 'com.android.support:support-v4:21.+:sources@jar'
}

It is not work for ext type of "aar"

with this, it's ok:

dependencies {
    compile 'com.a.b:abc:1.0.0@jar'  // notice here
    aarLinkSources 'com.a.b:abc:1.0.0:sources@jar'
}

and with this, it's NOT ok:

dependencies {
    compile 'com.a.b:abc:1.0.0@aar'  // notice here
    aarLinkSources 'com.a.b:abc:1.0.0:sources@jar'
}

but without the ext type aar, I will lost resource inside aar package

Build fails with Gradle 2.5

If a project is built with Gradle 2.5, the build will fail with the following exception:

Could not find method executeWithoutThrowingTaskFailure() for arguments [] on task ':aarLinkSources'

This is due to a change in Gradle 2.5 : gradle/gradle@f58d618

I already have an easy fix:

try {
    aarLinkSourcesTask.execute()
} catch (e) {
    // maybe log?
}

However i think it would be even better to only execute this plugin if it is in tooling mode, eg. when called by the IDE. This is totally unnecessary when called from command line. I am waiting for feedback on that.

No such file with some artifact sources

This is possibly a bug

try with this dependencies:

// Amazon AWS
compile 'com.amazonaws:aws-android-sdk-core:2.1.10'
compile 'com.amazonaws:aws-android-sdk-cognito:2.1.10'
aarLinkSources 'com.amazonaws:aws-android-sdk-core:2.1.10:sources'
aarLinkSources 'com.amazonaws:aws-android-sdk-cognito:2.1.10:sources'
//  DynamoDB
compile 'com.amazonaws:aws-android-sdk-ddb:2.1.10'
compile 'com.amazonaws:aws-android-sdk-ddb-mapper:2.1.10'
aarLinkSources 'com.amazonaws:aws-android-sdk-ddb:2.1.10:sources'
aarLinkSources 'com.amazonaws:aws-android-sdk-ddb-mapper:2.1.10:sources'

[AARLinkSources] [Info] Link sources: aws-android-sdk-core-2.1.10.jar
[AARLinkSources] [Error] No such file: /home/user/project.idea/libraries/aws_android_sdk_core.xml
[AARLinkSources] [Info] Link sources: aws-android-sdk-ddb-2.1.10.jar
[AARLinkSources] [Error] No such file: /home/user/project/.idea/libraries/aws_android_sdk_ddb.xml

then when I try too open an AWS class I see no sources, example:
com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient

the file
/home/user/project.idea/libraries/aws_android_sdk_core.xml
does not exist, indeed

but the file:
/home/user/project.idea/libraries/aws_android_sdk_core_2_1_10.xml
exist.

this is possibly a bug

Mark as Deprecated

Android Studio 1.4 has this support built in. As of today it is in release candidate status, thus I am recommending official deprecation of this plugin.

Automatically download all available sources

Hi there!

This is a great plugin. Thanks! ๐Ÿ˜„
What do you think of an option to automatically download available sources for all dependencies?

You could enable it like this:

aarLinkSources {
   downloadAllSources = true
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.