Skip to content

Commit

Permalink
Update to latest versions (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
elihart authored Aug 19, 2022
1 parent 5ed4682 commit 64ecbf3
Show file tree
Hide file tree
Showing 5 changed files with 296 additions and 250 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,24 +279,21 @@ class DeepLinkProcessor(symbolProcessorEnvironment: SymbolProcessorEnvironment?
element = methodElement,
errorMessage = "Only static methods can be annotated with @${DEEP_LINK_CLASS.simpleName}",
)
} else
// FIXME This is crashing with an NPE on internal classes when accessing the returnType.
// You can jut comment this check out for now if you need this to pass.
if (methodElement.returnType.typeElement?.qualifiedName !in listOf(
"android.content.Intent",
"androidx.core.app.TaskStackBuilder",
"com.airbnb.deeplinkdispatch.DeepLinkMethodResult"
)
) {
throw DeepLinkProcessorException(
element = methodElement,
errorMessage = (
"Only `Intent`, `androidx.core.app.TaskStackBuilder` or " +
"'com.airbnb.deeplinkdispatch.DeepLinkMethodResult' are supported. Please double " +
"check your imports and try again."
)
)
}
} else if (methodElement.returnType.typeElement?.qualifiedName !in listOf(
"android.content.Intent",
"androidx.core.app.TaskStackBuilder",
"com.airbnb.deeplinkdispatch.DeepLinkMethodResult"
)
) {
throw DeepLinkProcessorException(
element = methodElement,
errorMessage = (
"Only `Intent`, `androidx.core.app.TaskStackBuilder` or " +
"'com.airbnb.deeplinkdispatch.DeepLinkMethodResult' are supported. Please double " +
"check your imports and try again."
)
)
}
}

private fun verifyHandlerMatchArgs(element: XTypeElement, uriTemplate: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ open class BaseDeepLinkDelegate @JvmOverloads constructor(
result.methodResult.intent?.let { activity.startActivity(it) }
is DeepLinkEntry.HandlerDeepLinkEntry ->
callDeeplinkHandler(activity, result)
null -> {
// No - op
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
def versions = [
kotlinVersion : '1.6.10',
kotlinVersion : '1.7.10',
appCompatVersion : '1.4.1',
localBroadcastManagerVersion : '1.1.0',
roboelectricVersion : '4.5.1',
benchmarkVersion : '1.0.0',
compileTestingVersion : '1.4.7',
kspVersion : '1.6.10-1.0.4',
xProcessorVersion : '2.4.2',
compileTestingVersion : '1.4.9',
kspVersion : '1.7.10-1.0.6',
xProcessorVersion : '2.5.0-alpha02',
mockkVersion : '1.12.3',
ktlintGradlePluginVersion : '3.8.0',
androidXTestingVersion : '1.4.0'
]

ext.versions = versions
ext.androidConfig = [
agpVersion : '7.1.1',
compileSdkVersion : 31,
agpVersion : '7.2.1',
compileSdkVersion : 32,
minSdkVersion : 16,
targetSdkVersion : 30
]
Expand Down

This file was deleted.

Loading

0 comments on commit 64ecbf3

Please sign in to comment.