Skip to content

Conversation

@dratwas
Copy link
Contributor

@dratwas dratwas commented Jul 18, 2019

Summary:

Current regex doesn't support code like this:

class SomePackage() : ReactPackage {}

but kotlin does ;)

In this PR i added support for this

Test Plan:

Try autolinking for Andorid with package class like this:

class SomePackage() : ReactPackage {

    override fun createNativeModules(reactContext: ReactApplicationContext): MutableList<NativeModule> {
        return Collections.emptyList()
    }

    override fun createViewManagers(reactContext: ReactApplicationContext): MutableList<SimpleViewManager<View>> {
       return Collections.emptyList()
    }
}

@thymikee
Copy link
Member

I'd really appreciate extracting this regex to a function and adding a small unit test suite :)

@dratwas dratwas force-pushed the fix/android-regex branch from 453612f to 9e61712 Compare July 24, 2019 11:33
Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@thymikee thymikee merged commit eac98c0 into react-native-community:master Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants