Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically download all available sources #4

Open
jenzz opened this issue Mar 1, 2015 · 9 comments
Open

Automatically download all available sources #4

jenzz opened this issue Mar 1, 2015 · 9 comments

Comments

@jenzz
Copy link

jenzz commented Mar 1, 2015

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
}
@danielesegato
Copy link

+1 for this feature

@noproxy
Copy link

noproxy commented Apr 20, 2015

I add this add build.gradle

apply plugin: 'aar-link-sources'

dependencies {
    aarLinkSources {
        downloadAllSources = true
    }
}

But produce error when syncing:

Error:(113, 0) Cannot convert the provided notation to an object of type Dependency: build_835xzdg018b0t9zzo5vt54ie5$_run_closure5_closure11@54e59ba1.
The following types/formats are supported:
  - Instances of Dependency.
  - String or CharSequence values, e.g. 'org.gradle:gradle-core:1.0'.
  - Maps, e.g. [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
  - FileCollections, e.g. files('some.jar', 'someOther.jar').
  - Projects, e.g. project(':some:project:path').
  - ClassPathNotation, e.g. gradleApi().

Comprehensive documentation on dependency notations is available in DSL reference for DependencyHandler type.

How can I handle it?

@mikeholler
Copy link

This would be awesome. Although I would argue that this plugin should try to do that by default, so that all you need to do is apply the plugin and everything comes down automatically.

@xujiaao thank you so much for this library, it is proving to be very useful

@xujiaao
Copy link
Owner

xujiaao commented Apr 26, 2015

Sorry everybody, the Plugin dose not support the feature 'downloadAllSources' currently.

It is a good suggestion, but I do not know how to implement this feature now.... :(

Thank you for your advice.

@aluxian
Copy link

aluxian commented May 3, 2015

+1

@xujiaao Could you look through every entry in dependencies {} and when you find compile com.something:lib:1.0.0 do what aarLinkSources would have done if it had found aarLinkSources com.something:lib:1.0.0:sources@jar?

@ChaitanyaPramod
Copy link

I see that this has been done by #7 (if I understand it right) and it's merged to master already. Time to cut out a release?

@WonderCsabo
Copy link
Contributor

I agree. But this issue should be closed nevertheless.

BTW, you can easily build and install the plugin from source then use it. Clone the repo, then gradlew install. After, add this to your build.gradle

buildscript {
    repositories {
        mavenLocal()
       // etc
    }
    dependencies {
        classpath 'AARLinkSources:plugin:unspecified' // just installed to local repo
        // etc
    }
}

@damonliuchn
Copy link

What do you think of an default option to automatically link the available source and doc ?Don't need add "aarLinkSources 'xxxxxsources@jar' "

@WonderCsabo
Copy link
Contributor

@MasonLiuChn i already implemented that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants