Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Wrong POM when using androidTestCompile #31

Closed
yasevich opened this issue Apr 6, 2015 · 5 comments
Closed

Wrong POM when using androidTestCompile #31

yasevich opened this issue Apr 6, 2015 · 5 comments

Comments

@yasevich
Copy link

yasevich commented Apr 6, 2015

Hi, guys.

Lets say I have build script that contains these dependencies:

dependencies {
    compile 'com.yandex.money.api:yandex-money-sdk-java:3.0.2'
    compile 'com.google.code.gson:gson:2.3'
    androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
    androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.3.1'
}

When I upload file to bintray, your plugin generates following POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.yandex.money.api</groupId>
  <artifactId>yandex-money-sdk-android</artifactId>
  <version>2.0-rc2</version>
  <packaging>aar</packaging>
  <dependencies>
    <dependency>
      <groupId>com.android.support.test</groupId>
      <artifactId>testing-support-lib</artifactId>
      <version>0.1</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support.test.espresso</groupId>
      <artifactId>espresso-core</artifactId>
      <version>2.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.jayway.android.robotium</groupId>
      <artifactId>robotium-solo</artifactId>
      <version>5.3.1</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

If I try to delete androidTestCompile dependencies:

dependencies {
    compile 'com.yandex.money.api:yandex-money-sdk-java:3.0.2'
    compile 'com.google.code.gson:gson:2.3'
}

The plugin creates correct POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.yandex.money.api</groupId>
  <artifactId>yandex-money-sdk-android</artifactId>
  <version>2.0-rc1</version>
  <packaging>aar</packaging>
  <dependencies>
    <dependency>
      <groupId>com.yandex.money.api</groupId>
      <artifactId>yandex-money-sdk-java</artifactId>
      <version>3.0.2</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.3</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

Can it be fixed?

Thanks.

@ouchadam
Copy link
Contributor

ouchadam commented Apr 6, 2015

whoa that's a big bug! I'll look into it, thanks for reporting it

@ouchadam
Copy link
Contributor

ouchadam commented Apr 6, 2015

all done ! #32

xrigau pushed a commit that referenced this issue Apr 7, 2015
#31 Wrong dependencies pulled into the pom
@blundell
Copy link
Contributor

blundell commented Apr 7, 2015

👍

@xrigau
Copy link
Contributor

xrigau commented Apr 9, 2015

0.2.9 has been released with this fix https://bintray.com/novoda/maven/bintray-release/0.2.9/view

@xrigau xrigau closed this as completed Apr 9, 2015
@yasevich
Copy link
Author

yasevich commented Apr 9, 2015

Thanks guys.

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

No branches or pull requests

4 participants