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

Square Libs missing #15

Closed
ruclip opened this issue Jun 9, 2017 · 14 comments
Closed

Square Libs missing #15

ruclip opened this issue Jun 9, 2017 · 14 comments

Comments

@ruclip
Copy link

ruclip commented Jun 9, 2017

Hi,

great Job with you Lib! This lib help me a lot to generating my open source view automatically. Thank you!

I found one big problem:

Some dependencies (square etc.) in generated JSON and HTML file are missing.

Dependencies:

// Support
    compile "com.android.support:appcompat-v7:${supportVersion}"
    compile "com.android.support:design:${supportVersion}"
    compile "com.android.support:support-v13:${supportVersion}"
    compile "com.android.support:percent:${supportVersion}"
    compile "com.android.support:recyclerview-v7:${supportVersion}"

    //Annotations
    apt "org.androidannotations:androidannotations:${androidannotationsVersion}"
    compile "org.androidannotations:androidannotations-api:${androidannotationsVersion}"

    // Network
    compile "com.squareup.retrofit2:retrofit:${retrofitVersion}"
    compile "com.squareup.retrofit2:converter-gson:${retrofitVersion}"
    compile "com.squareup.okhttp3:logging-interceptor:${okhttpVersion}"
    compile "com.squareup.okhttp3:okhttp:${okhttpVersion}"
    compile "com.squareup.okhttp3:okhttp-urlconnection:${okhttpVersion}"
    compile "com.github.bumptech.glide:glide:3.7.0"
    compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'

    // View
    compile 'me.relex:circleindicator:1.2.1@aar'
    compile 'eu.davidea:flexible-adapter:5.0.0-b8'
    compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
    compile 'com.daimajia.swipelayout:library:1.2.0@aar'
    compile 'de.hdodenhof:circleimageview:2.1.0'

    // Fonts
    compile 'uk.co.chrisjenx:calligraphy:2.3.0'

    // DevOps
    compile "net.hockeyapp.android:HockeySDK:${hockeyApp}"

    // Logging
    compile "org.slf4j:slf4j-android:${slf4jVersion}"

    // Chuck Interceptor
    debugCompile "com.readystatesoftware.chuck:library:${chuckVersion}"
    debug_testCompile "com.readystatesoftware.chuck:library:${chuckVersion}"
    alphaCompile "com.readystatesoftware.chuck:library-no-op:${chuckVersion}"
    betaCompile "com.readystatesoftware.chuck:library-no-op:${chuckVersion}"
    showcaseCompile "com.readystatesoftware.chuck:library-no-op:${chuckVersion}"
    qsCompile "com.readystatesoftware.chuck:library-no-op:${chuckVersion}"
    releaseCompile "com.readystatesoftware.chuck:library-no-op:${chuckVersion}"

    // Leak Canary
    debugCompile "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
    debug_testCompile "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
    alphaCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
    betaCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
    showcaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
    qsCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
    releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
    testCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"

Generated JSON:

[
    {
        "project": "Android SwipeLayout Library",
        "developers": "daimajia",
        "url": "https://github.com/daimajia/AndroidSwipeLayout",
        "year": null,
        "license": "MIT",
        "license_url": "http://opensource.org/licenses/MIT"
    },
    {
        "project": "Animated-vector-drawable",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Appcompat-v7",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Calligraphy",
        "developers": "Christopher Jenkins",
        "url": "https://github.com/chrisjenx/Calligraphy",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Chuck no-op",
        "developers": "Jeff Gilfelt",
        "url": "https://github.com/jgilfelt/chuck",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "CircleImageView",
        "developers": "Henning Dodenhof",
        "url": "https://github.com/hdodenhof/CircleImageView",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "CircleIndicator",
        "developers": "relex",
        "url": "https://github.com/ongakuer/CircleIndicator",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Design",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "FlexibleAdapter",
        "developers": "Davide Steduto",
        "url": "https://github.com/davideas/FlexibleAdapter",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Glide",
        "developers": "Sam Judd",
        "url": "https://github.com/bumptech/glide",
        "year": null,
        "license": "Simplified BSD License",
        "license_url": "http://www.opensource.org/licenses/bsd-license"
    },
    {
        "project": "Glide OkHttp 3.x Integration",
        "developers": "Sam Judd",
        "url": "https://github.com/bumptech/glide",
        "year": null,
        "license": "Simplified BSD License",
        "license_url": "http://www.opensource.org/licenses/bsd-license"
    },
    {
        "project": "Hugo Annotations",
        "developers": "Jake Wharton",
        "url": "https://github.com/JakeWharton/hugo/",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "No op LeakCanary for Android",
        "developers": "Square, Inc.",
        "url": "http://github.com/square/leakcanary/",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Percent",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "ReLinker",
        "developers": "KeepSafe",
        "url": "https://github.com/KeepSafe/ReLinker",
        "year": "2015",
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Realm-annotations",
        "developers": null,
        "url": "scm:https://github.com/realm/realm-java",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Recyclerview-v7",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "SLF4J API and Google Android Binding",
        "developers": "Thorsten M\u00f6ller",
        "url": null,
        "year": "2009",
        "license": "The MIT License",
        "license_url": "http://www.opensource.org/licenses/mit-license.php"
    },
    {
        "project": "Simple and fantastic wheel view in realistic effect for android",
        "developers": "Aige",
        "url": "https://github.com/AigeStudio/WheelPicker",
        "year": null,
        "license": "The Apache Software License, Version 2.0",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-annotations",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-compat",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-core-ui",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-core-utils",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-fragment",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-media-compat",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-v13",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-v4",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Support-vector-drawable",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    },
    {
        "project": "Transition",
        "developers": null,
        "url": null,
        "year": null,
        "license": "The Apache Software License",
        "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
    }
]
@jaredsburrows
Copy link
Owner

Which square libraries specifically? Also, if they are missing, it must be because their license is missing in the POM.xml file.

@Tapchicoma
Copy link

Maybe the plugin should show warnings for missing licenses on generating the report.

Also It would be nice to provide some way to set license for this "missed" dependencies.

@jaredsburrows
Copy link
Owner

@Tapchicoma I can create an issue for the warnings.

For the missing dependencies, you can edit the .json file that is creates.

@Tapchicoma
Copy link

Editing the json file is not so nice solution, as it requires manual work afterwards. Then it will be an irritating job to change any dependency.

I prefer fully automatic way - configure once and forget, because it just works. IMHO there should be a way to do it though configuration, either providing some file in extension or some other way. This file should contain mapping to this missing dependencies.

@jaredsburrows
Copy link
Owner

@Tapchicoma Sort of like a "default" or "fallback"?

@Tapchicoma
Copy link

More like a fallback: when plugin can't figure out dependency info, then it should look for it in this "mapping file".

@jaredsburrows
Copy link
Owner

@Tapchicoma Should the mapping file be included in the plugin?

@Tapchicoma
Copy link

@jaredsburrows probably no, just to point in README that there is such possibility.

Every project has it own set of dependencies and also it will be easier to maintain the plugin itself.

@jaredsburrows
Copy link
Owner

What would this feature look like? How would it work? If a license is missing, default to Apache 2.0?

@Tapchicoma
Copy link

In case of missing license plugin should write warning in gradle output.

Optionally: add plugin extension flag that, when enabled, will fail the build on missing license.

@jaredsburrows
Copy link
Owner

jaredsburrows commented Oct 21, 2017

I have added logging for developers to show which dependencies are missing POM data.

For example:

$ gradlew licenseDebugReport

> Task :licenseDebugReport
OkHttp Logging Interceptor dependency does not have a license.
Adapter: RxJava 2 dependency does not have a license.
Converter: Moshi dependency does not have a license.
Retrofit dependency does not have a license.
OkHttp dependency does not have a license.
moshi-adapters dependency does not have a license.
Moshi dependency does not have a license.
Okio dependency does not have a license.
Wrote HTML report to /<>/repo/android-gif-example/build/reports/licenses/licenseDebugReport.html.
Wrote JSON report to /<>/repo/android-gif-example/build/reports/licenses/licenseDebugReport.json.


BUILD SUCCESSFUL in 7s
1 actionable task: 1 executed

Source: https://github.com/jaredsburrows/android-gif-example

@jaredsburrows
Copy link
Owner

@ruclip I have reported this issue here: square/retrofit#2529.

If they let me make a PR to add the license information in the POM files, the plugin will pick it up next time.

@jaredsburrows
Copy link
Owner

@ruclip Since the issue was closed, I wrote to support traversing parent POM files here: #20.

@jaredsburrows
Copy link
Owner

Closed by #27.

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

3 participants