kingdom578 / maven-android-plugin

Automatically exported from code.google.com/p/maven-android-plugin
0 stars 0 forks source link

Apklib seems broken in 3.8.2 #443

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Having an app(A) that uses an apklib(B) that uses an apklib(C). Not sure 
exactly what's required, but that's the setup here. E.g. a branded app that 
uses facebook.
2. mvn clean install
3. Runtime compare C's R-file and compare it against A's R-file, e.g. 
   com.facebook.android.R.layout.com_facebook_login_activity_layout
   vs
   com.example.app.R.layout.com_facebook_login_activity_layout

What is the expected output?
They should be the same int value.

What do you see instead?
com.facebook.android.R.layout.com_facebook_login_activity_layout will be equal 
to a random resource id in com.example.app.R as they have not been remapped as 
they should.

What version of maven-android-plugin are you using?
3.8.2. The stable version before that (3.8.1) works as expected.

What are the complete output lines of "mvn -version" on your machine?
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
17:22:22+0200)
Maven home: /usr/local/apache-maven-3.1.1
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle-1.7.0.45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.11.0-15-generic", arch: "amd64", family: "unix"

Please provide any additional information below.

Original issue reported on code.google.com by tob...@olsson.be on 4 Feb 2014 at 2:40

GoogleCodeExporter commented 9 years ago
Not sure how to mark things as duplicate, but this is a duplicate of 442, 441, 
440, 437.

Basically, the following code should ALWAYS be true, but isn't with 3.8.2:

        public void givenTwoDifferentRFilesWhenExaminingSameIdNameThenValueShouldBeSame() {
                int qbR = com.example.app.R.layout.com_facebook_login_activity_layout;
                int fbR = R.layout.com_facebook_login_activity_layout;
                assertEquals("Something went wrong with the build. R is not working.", fbR, qbR);
        }

Original comment by tob...@olsson.be on 4 Feb 2014 at 11:02

GoogleCodeExporter commented 9 years ago
437 isn't a duplicate as it is invalid and should be closed
440 is also different

Original comment by benoit.b...@gmail.com on 6 Feb 2014 at 2:30

GoogleCodeExporter commented 9 years ago
Test against 3.8.3-SNAPSHOT

If it is still an issue then provide a project or a link to a project that 
clearly highlights the failure.

Original comment by william....@xandar.com.au on 17 Feb 2014 at 11:05

GoogleCodeExporter commented 9 years ago
as I understood from an issue description this issue is similar to 441, so it 
can be closed as duplicated

Original comment by olegalex...@gmail.com on 17 Feb 2014 at 12:46

GoogleCodeExporter commented 9 years ago
Since it isn't closed yet, I can tell that it is NOT resolved in current 
version on github. (Mon, 17 Feb 2014 17:50:49 +0000)

My test above still fails.

It is not an open source project, so I cannot share the source.

Original comment by tob...@olsson.be on 17 Feb 2014 at 5:52

GoogleCodeExporter commented 9 years ago
I mean that similar issue already presents in opened issues, you can see:
https://code.google.com/p/maven-android-plugin/issues/detail?id=441

I just think that no need to leave two similar issues as opened.

Original comment by olegalex...@gmail.com on 17 Feb 2014 at 6:57

GoogleCodeExporter commented 9 years ago
Close this one. I posted a sample project in the other issue.

Original comment by tob...@olsson.be on 17 Feb 2014 at 8:26

GoogleCodeExporter commented 9 years ago
Thanks Tobias. We'll track it in 441

Original comment by william....@xandar.com.au on 17 Feb 2014 at 10:18