-
Notifications
You must be signed in to change notification settings - Fork 395
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
Update sdk to version 25 and fix ResourceClassGenerator to not write final fields #757
Conversation
pom.xml
Outdated
<android.builder.version>1.5.0</android.builder.version> | ||
<android.tools.version>24.5.0</android.tools.version> | ||
<android.builder.version>2.2.3</android.builder.version> | ||
<android.tools.version>25.2.0</android.tools.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
25.2.3 and if we have too many problems we can try the latest beta.
Sorry this is only on jcenter.....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this is only on jcenter.....
Argh, hate what has happened to the maven ecosystem lately...
pom.xml
Outdated
<android.builder.version>1.5.0</android.builder.version> | ||
<android.tools.version>24.5.0</android.tools.version> | ||
<android.builder.version>2.2.3</android.builder.version> | ||
<android.tools.version>25.2.3</android.tools.version> | ||
</properties> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need this too:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-maven</id>
<name>bintray</name>
<url>https://dl.bintray.com/android/android-tools</url>
</repository>
</repositories>
I'm updating stuff on my branch https://github.com/simpligility/android-maven-plugin/tree/update-sdk-25 You can merge stuff from it to your PR. I will most probably not finish this upgrade as I once tried before and didn't get some stuff. |
Now I remember, last time I couldn't find how to fix that change but you did it :) final String packageName = VariantConfiguration.getManifestPackage( libManifestFile ); |
Yeah, I found that code in the old version, |
So in my branch only the emulator test is not working... and the manifest merger 2 needs to be checked You can merge my stuff in your PR if you want. UPDATE: Btw some code is gone from the latest beta ...
I guess it would be better to target the latest beta |
I've updated my branch with the latest BETA stuff |
SymbolWiter is deprecated https://android.googlesource.com/platform/tools/base/+/master/sdklib/src/main/java/com/android/sdklib/internal/build/SymbolWriter.java They say to use AndroidBuilder https://android.googlesource.com/platform/tools/build/+/master/builder/src/main/java/com/android/builder/AndroidBuilder.java And then I found
|
I will let you finish this PR and properly test it :p |
I'll try, any hint on my previous question ("I'm not sure how I can detect if the generation is run during test lifecycle (and inside an aar library).")? |
Maybe @mosabua knows |
I've made some progress updating it to match AndroidBuilder#processResources, currently testing |
Is there a IntelliJ codestyle config anywhere? Checkstyle kills me here... |
haha I also hate the codestyle :p @mosabua Do we have an intellij formatter? |
Huh, so now it only generates the main R file (but includes all symbols from libs), not yet sure how to fix that using the new classes. |
I think that's it, my (rather complex 20-modules) project is now building successfully and all tests are working, even with robolectric 3.2.1. Also: I still need to check an actual apk build (my project only consists of aar libraries). I think there is still one bug: no final (which is required for apks) |
Do you use manifest merger? Cuz I quickly did that upgrade and wasn't too
sure about that. I didn't take the time to look deeper.
It needs to be tested at least with one merge
…On Thu, 12 Jan 2017, 17:47 Philip Schiffer, ***@***.***> wrote:
I think that's it, my (rather complex 20-modules) project is now building
successfully and all tests are working, even with robolectric 3.2.1.
Now I need to verify, if all (manifests etc) is correct :)
Also: I still need to check an actual apk build (my project only consists
of aar libraries)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABrbC6ToRbCbpQzcOstHsXQjEOuK4LKYks5rRlkogaJpZM4LhgPy>
.
|
Yes, it's used heavily in this project. It's on my to-do list for apk build test. Gonna compare old and new APK using Android studio. |
Oh and manifest merger v1 is gone. Some class are gone from android
builder... Maybe we can bring them back in the project if we still want to
support it
…On Thu, 12 Jan 2017, 17:59 Philip Schiffer, ***@***.***> wrote:
Yes, it's used heavily in this project. It's on my to-do list for apk
build test. Gonna compare old and new APK using Android studio.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABrbC82n7hqO74JMzG3ruJJ6f40axlYFks5rRlvxgaJpZM4LhgPy>
.
|
APK looks good, will cleanup this branch and try to match the codestyle and then it should be done |
@Shusshu Done |
I have never used the emulator mojo either. |
@hameno you can use rc1 now
|
You can update it again ;) it's released 2.3.0 and then somebody should test & merge this |
f572a33
to
3ebe946
Compare
I got every test except AbstractEmulatorMojoTest to pass. AbstractEmulatorMojoTest fails due to an ExceptionInInitializerError because AndroidSdkHandler cannot init the SchemaModule fields (ADDON_MODULE, REPOSITORY_MODULE, SYS_IMG_MODULE, COMMON_MODULE). I tracked it down to SchemaModule:156 which tries to get a namespace for a XML annotation. I'm not sure why this fails as the LinkedList contains the annotation but with a different hash?! Maybe PowerMock is the reason? Should we just disable the test? |
I don't mind if we disable it... wdyt @simpligility/android-maven-plugins-core-committers ? |
If we disable support for the emulator mojos we completely loose the ability to run automated integration tests. That sucks imho. I am however not aware of the plans from the SDK team on how to support emulator interaction going forward (or even the current status). |
But yes.. maybe we can disable the test for now or at least the failing method and try to replace it. That whole mocking is a PITA anyway. If the mojo works in an integration test maybe that test can completely disappear and we dont worry about it. |
@hameno can you add a @ignore for the emulator test? @simpligility/android-maven-plugins-core-committers I have been testing the emulator-start command and it actually doesn't work even in previous versions The script it creates can be executed manually but the CommandExecutor cannot run it. I couldn't find why. So let's merge this in with @ignore on the emulator test |
Okay, gonna do this later today. @Shusshu Maybe the script does not have execute permissions? |
I was able to run it via the cmd line |
It sucks that the plugin needs the bintray repo. That basically means it wont work out of the box for normal Maven users and we need to update the docs. But I think we should merge this now and iterate in master.. |
Why would it not work for normal users?
It's just a repo... But anyway that was to access the android builder beta
version now we use the stable one so it should work without it
…On Wed, 22 Mar 2017, 17:34 Manfred Moser, ***@***.***> wrote:
It sucks that the plugin needs the bintray repo. That basically means it
wont work out of the box for normal Maven users and we need to update the
docs. But I think we should merge this now and iterate in master..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABrbC2XVaGcQEXqH5w_42OqLGg7Q3CUIks5roU15gaJpZM4LhgPy>
.
|
Great ... you wanna merge this now then? |
I am working atm but hopefully can give this a whirl tonight.. just got back last night.. |
Ok cool. Just need to wait the last ignore change or you can do it later
when you try it out
…On Wed, 22 Mar 2017, 17:38 Manfred Moser, ***@***.***> wrote:
Great ... you wanna merge this now then?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABrbC83m1L6KyWVIGk25Uiyh3KnyLELGks5roU6agaJpZM4LhgPy>
.
|
Sounds good. Will probably do a release associated to that .. have you tried the site build? With the change to JDK 8 it probably fails all over the place.. |
Nope haven't tried
…On Wed, 22 Mar 2017, 17:46 Manfred Moser, ***@***.***> wrote:
Sounds good. Will probably do a release associated to that .. have you
tried the site build? With the change to JDK 8 it probably fails all over
the place..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABrbC8MLSnLoWYQOhUEEOCAYW8Ud4IjRks5roVCBgaJpZM4LhgPy>
.
|
I've disabled the test |
Btw I updated the changedlog and remove the bintray repo. All good so far.. more tonight. Will up version to 4.5.0 for release |
No description provided.