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

OkBuck generates incorrect Buck file with test artifact #375

Closed
cwoodwar6 opened this issue Jan 31, 2017 · 1 comment
Closed

OkBuck generates incorrect Buck file with test artifact #375

cwoodwar6 opened this issue Jan 31, 2017 · 1 comment
Assignees
Labels

Comments

@cwoodwar6
Copy link
Contributor

Dependencies.gradle:

ext.deps = [
    dagger2: [
        dagger2: "com.google.dagger:dagger:2.8",
        dagger2compiler: "com.google.dagger:dagger-compiler:2.8",
        dagger2Test: "com.google.dagger:dagger:2.8:tests"
    ]
]

App module dependencies:

  compile project(':app-library')

  compile deps.dagger2.dagger2
  annotationProcessor deps.dagger2.dagger2compiler
  testCompile deps.dagger2.dagger2Test

Library module dependencies:

  compile deps.dagger2.dagger2
  annotationProcessor deps.dagger2.dagger2compiler

The library module's generated Buck file:

deps = [
   '//.okbuck/cache:com.google.dagger.dagger-2.8-tests.jar',
]

Dagger's test artifact is used in the library module instead of the main dagger artifact.

This line:
//.okbuck/cache:com.google.dagger.dagger-2.8-tests.jar
should instead be:
//.okbuck/cache:com.google.dagger.dagger-2.8.jar

Repro project: https://github.com/cwoodwar6/okbuck-test-project

@kageiit
Copy link
Contributor

kageiit commented Feb 1, 2017

I think this is because the dependency cache does not handle artifacts with classifiers correctly yet.

cc @raviagarwal7

We will work on a fix, but in the meanwhile, you can try to rename your artifact to something like com.google.dagger:dagger-tests:2.8 and upload to a local maven. The other option is to consume the dagger test jar as a local jar dependency to unblock yourself.

@hanjunx
Copy link

hanjunx commented Feb 1, 2017 via email

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

No branches or pull requests

4 participants