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

AndroidX migration #223

Merged
merged 16 commits into from Jul 27, 2018

Conversation

Projects
None yet
6 participants
@carvaq
Copy link
Contributor

carvaq commented Jun 19, 2018

The processor generates support classes that are no longer compatible with projects running AndroidX. With theses changes the processor will look for and generate AndroidX classes.

Is related to issue #222

AndroidX Release notes

@felipecsl
Copy link
Collaborator

felipecsl left a comment

LGTM, thanks! Can you also fix the Travis config, please?

carvaq added some commits Jun 20, 2018

@carvaq

This comment has been minimized.

Copy link
Contributor Author

carvaq commented Jun 20, 2018

Hi @felipecsl

I tried fixing the config, but I'm always getting an error about accepting the terms and conditions for the new build tools. On this StackOverflow post they suggest to add yes | sdkmanager --licenses to the travis config. I haven't had the chance to work with travis before, so I'm not entirely sure what the best approach would be.

carvaq added some commits Jun 21, 2018

Merge branch 'master' into androidX-migration
# Conflicts:
#	.travis.yml
#	build.gradle
#	deeplinkdispatch-processor/src/main/java/com/airbnb/deeplinkdispatch/DeepLinkProcessor.java
#	deeplinkdispatch-processor/src/test/resources/DeepLinkDelegate.java
#	gradle.properties
#	sample-library/build.gradle
#	sample/build.gradle
#	sample/src/test/java/com/airbnb/deeplinkdispatch/sample/ShadowTaskStackBuilder.java
@rossbacher

This comment has been minimized.

Copy link
Collaborator

rossbacher commented Jul 24, 2018

@carvaq Can you try to add this to the travis yml file?

licenses:
    - 'android-sdk-preview-license-.+'
    - 'android-sdk-license-.+'
    - 'google-gdk-license-.+'
@carvaq

This comment has been minimized.

Copy link
Contributor Author

carvaq commented Jul 25, 2018

@rossbacher Hi! I did the change and updated all the libs. It's crashing currently because of the processor tests. They don't seem to find some of the imports.
I tried to look into it and find a solution, but I'm getting nowhere. I'm not able to find one of the dependencies in the google repo (com.google.android:android).
Couldn't we move DeepLinkProcessorTest to a more suitable location?

Andreas Rossbacher
- Removed binary dependency on old support lib and replaced it with new
androidx dependency and some documentation
- Updated some naming
@rossbacher

This comment has been minimized.

Copy link
Collaborator

rossbacher commented Jul 25, 2018

@carvaq I created carvaq#1 against your fork. This fixes the problem with the dependency and after that the PR should pass and we will be able to merge it soon.

@carvaq

This comment has been minimized.

Copy link
Contributor Author

carvaq commented Jul 26, 2018

Of course! I didn't realize that the android libs are aar. Thank you for fixing it!

@rossbacher rossbacher merged commit 0ae5613 into airbnb:master Jul 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rossbacher

This comment has been minimized.

Copy link
Collaborator

rossbacher commented Jul 27, 2018

Thank you @carvaq !

@tallnato

This comment has been minimized.

Copy link

tallnato commented Aug 31, 2018

When are you planning to do a release with this migration?

I was trying to use it through Jitpack, but it seams that the com.github.airbnb.DeepLinkDispatch:deeplinkdispatch:XXX is not being included in the jitpack release
https://jitpack.io/com/github/airbnb/DeepLinkDispatch/master-v3.1.1-g0ae5613-9/build.log

@semanticer

This comment has been minimized.

Copy link

semanticer commented Sep 12, 2018

When can we expect this or how can we work around it right now? Thank you for any help @carvaq @rossbacher

@rogerhu

This comment has been minimized.

Copy link
Contributor

rogerhu commented Sep 26, 2018

It's been over a year since a build got pushed (https://oss.sonatype.org/content/repositories/snapshots/com/airbnb/deeplinkdispatch/3.2.0-SNAPSHOT/).

My workaround has been to use composite builds:

a. First, fork this repo.

b. Then update your settings.gradle to reference this project:

includeBuild('../DeepLinkDispatch') {
    dependencySubstitution {
        substitute module("com.airbnb:deeplinkdispatch-processor") with project(':deeplinkdispatch-processor')
        substitute module("com.airbnb:deeplinkdispatch") with project(':deeplinkdispatch')

    }
}

c. Update the dependencies.gradle in this project to match the Android gradle plugin version being used:

+++ b/dependencies.gradle
@@ -6,7 +6,7 @@ def versions = [
 
 ext.versions = versions
 ext.androidConfig = [
-    agpVersion       : '3.2.0-beta04',
+    agpVersion       : '3.2.0',
@rogerhu

This comment has been minimized.

Copy link
Contributor

rogerhu commented Sep 26, 2018

This PR #230 should also fix JitPack.Io snapshots:

I tested with these Gradle commands:

implementation "com.github.rogerhu.DeepLinkDispatch:deeplinkdispatch:maven-SNAPSHOT"
annotationProcessor "com.github.rogerhu.DeepLinkDispatch:deeplinkdispatch-processor:maven-SNAPSHOT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.