diff --git a/packages/react-native-codegen/e2e/deep_imports/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap b/packages/react-native-codegen/e2e/deep_imports/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap index 855a3747f39..c5c4b4b3545 100644 --- a/packages/react-native-codegen/e2e/deep_imports/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap +++ b/packages/react-native-codegen/e2e/deep_imports/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap @@ -2,7 +2,7 @@ exports[`GeneratePropsJavaInterface can generate for 'ArrayPropsNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -11,27 +11,26 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ArrayPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setNames(T view, @Nullable ReadableArray value); - void setDisableds(T view, @Nullable ReadableArray value); - void setProgress(T view, @Nullable ReadableArray value); - void setRadii(T view, @Nullable ReadableArray value); - void setColors(T view, @Nullable ReadableArray value); - void setSrcs(T view, @Nullable ReadableArray value); - void setPoints(T view, @Nullable ReadableArray value); - void setEdgeInsets(T view, @Nullable ReadableArray value); - void setDimensions(T view, @Nullable ReadableArray value); - void setSizes(T view, @Nullable ReadableArray value); - void setObject(T view, @Nullable ReadableArray value); - void setArrayOfObjects(T view, @Nullable ReadableArray value); - void setArrayOfMixed(T view, @Nullable ReadableArray value); +public interface ArrayPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setNames(view: T, value: ReadableArray?): Unit + public fun setDisableds(view: T, value: ReadableArray?): Unit + public fun setProgress(view: T, value: ReadableArray?): Unit + public fun setRadii(view: T, value: ReadableArray?): Unit + public fun setColors(view: T, value: ReadableArray?): Unit + public fun setSrcs(view: T, value: ReadableArray?): Unit + public fun setPoints(view: T, value: ReadableArray?): Unit + public fun setEdgeInsets(view: T, value: ReadableArray?): Unit + public fun setDimensions(view: T, value: ReadableArray?): Unit + public fun setSizes(view: T, value: ReadableArray?): Unit + public fun setObject(view: T, value: ReadableArray?): Unit + public fun setArrayOfObjects(view: T, value: ReadableArray?): Unit + public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit } ", } @@ -39,7 +38,7 @@ public interface ArrayPropsNativeComponentViewManagerInterface e exports[`GeneratePropsJavaInterface can generate for 'BooleanPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -48,15 +47,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface BooleanPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); - void setDisabledNullable(T view, @Nullable Boolean value); +public interface BooleanPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit + public fun setDisabledNullable(view: T, value: Boolean?): Unit } ", } @@ -64,7 +62,7 @@ public interface BooleanPropNativeComponentViewManagerInterface exports[`GeneratePropsJavaInterface can generate for 'ColorPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -73,14 +71,13 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ColorPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setTintColor(T view, @Nullable Integer value); +public interface ColorPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setTintColor(view: T, value: Int?): Unit } ", } @@ -88,7 +85,7 @@ public interface ColorPropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'DimensionPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -97,15 +94,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; import com.facebook.yoga.YogaValue; -public interface DimensionPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setMarginBack(T view, @Nullable YogaValue value); +public interface DimensionPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setMarginBack(view: T, value: YogaValue?): Unit } ", } @@ -113,7 +109,7 @@ public interface DimensionPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { +public interface EdgeInsetsPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { // No props } ", @@ -136,7 +132,7 @@ public interface EdgeInsetsPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setAlignment(T view, @Nullable String value); - void setIntervals(T view, @Nullable Integer value); +public interface EnumPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setAlignment(view: T, value: String?): Unit + public fun setIntervals(view: T, value: Int?): Unit } ", } @@ -161,7 +156,7 @@ public interface EnumPropNativeComponentViewManagerInterface ext exports[`GeneratePropsJavaInterface can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -170,13 +165,13 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface EventNestedObjectPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface EventNestedObjectPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -184,7 +179,7 @@ public interface EventNestedObjectPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface EventPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -207,7 +202,7 @@ public interface EventPropsNativeComponentViewManagerInterface e exports[`GeneratePropsJavaInterface can generate for 'FloatPropsNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -216,20 +211,19 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface FloatPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setBlurRadius(T view, float value); - void setBlurRadius2(T view, float value); - void setBlurRadius3(T view, float value); - void setBlurRadius4(T view, float value); - void setBlurRadius5(T view, float value); - void setBlurRadius6(T view, float value); - void setBlurRadiusNullable(T view, @Nullable Float value); +public interface FloatPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setBlurRadius(view: T, value: Float): Unit + public fun setBlurRadius2(view: T, value: Float): Unit + public fun setBlurRadius3(view: T, value: Float): Unit + public fun setBlurRadius4(view: T, value: Float): Unit + public fun setBlurRadius5(view: T, value: Float): Unit + public fun setBlurRadius6(view: T, value: Float): Unit + public fun setBlurRadiusNullable(view: T, value: Float?): Unit } ", } @@ -237,7 +231,7 @@ public interface FloatPropsNativeComponentViewManagerInterface e exports[`GeneratePropsJavaInterface can generate for 'ImagePropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -246,15 +240,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ImagePropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setThumbImage(T view, @Nullable ReadableMap value); +public interface ImagePropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setThumbImage(view: T, value: ReadableMap?): Unit } ", } @@ -262,7 +255,7 @@ public interface ImagePropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'IntegerPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -271,15 +264,15 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface IntegerPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setProgress1(T view, int value); - void setProgress2(T view, int value); - void setProgress3(T view, int value); +public interface IntegerPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setProgress1(view: T, value: Int): Unit + public fun setProgress2(view: T, value: Int): Unit + public fun setProgress3(view: T, value: Int): Unit } ", } @@ -287,7 +280,7 @@ public interface IntegerPropNativeComponentViewManagerInterface exports[`GeneratePropsJavaInterface can generate for 'InterfaceOnlyNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -296,14 +289,13 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface InterfaceOnlyNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setTitle(T view, @Nullable String value); +public interface InterfaceOnlyNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setTitle(view: T, value: String?): Unit } ", } @@ -311,7 +303,7 @@ public interface InterfaceOnlyNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setMixedProp(T view, Dynamic value); +public interface MixedPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setMixedProp(view: T, value: Dynamic): Unit } ", } @@ -335,7 +327,7 @@ public interface MixedPropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'MultiNativePropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -344,18 +336,17 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MultiNativePropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setThumbImage(T view, @Nullable ReadableMap value); - void setColor(T view, @Nullable Integer value); - void setThumbTintColor(T view, @Nullable Integer value); - void setPoint(T view, @Nullable ReadableMap value); +public interface MultiNativePropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setThumbImage(view: T, value: ReadableMap?): Unit + public fun setColor(view: T, value: Int?): Unit + public fun setThumbTintColor(view: T, value: Int?): Unit + public fun setPoint(view: T, value: ReadableMap?): Unit } ", } @@ -363,7 +354,7 @@ public interface MultiNativePropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { +public interface NoPropsNoEventsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { // No props } ", @@ -386,7 +377,7 @@ public interface NoPropsNoEventsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setObjectProp(T view, @Nullable ReadableMap value); - void setObjectArrayProp(T view, @Nullable ReadableMap value); - void setObjectPrimitiveRequiredProp(T view, @Nullable ReadableMap value); +public interface ObjectPropsNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setObjectProp(view: T, value: ReadableMap?): Unit + public fun setObjectArrayProp(view: T, value: ReadableMap?): Unit + public fun setObjectPrimitiveRequiredProp(view: T, value: ReadableMap?): Unit } ", } @@ -413,7 +403,7 @@ public interface ObjectPropsNativeComponentManagerInterface exte exports[`GeneratePropsJavaInterface can generate for 'PointPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -422,15 +412,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface PointPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setStartPoint(T view, @Nullable ReadableMap value); +public interface PointPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setStartPoint(view: T, value: ReadableMap?): Unit } ", } @@ -438,7 +427,7 @@ public interface PointPropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'StringPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -447,15 +436,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface StringPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setPlaceholder(T view, @Nullable String value); - void setDefaultValue(T view, @Nullable String value); +public interface StringPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setPlaceholder(view: T, value: String?): Unit + public fun setDefaultValue(view: T, value: String?): Unit } ", } diff --git a/packages/react-native-codegen/e2e/namespaced/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap b/packages/react-native-codegen/e2e/namespaced/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap index 855a3747f39..c5c4b4b3545 100644 --- a/packages/react-native-codegen/e2e/namespaced/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap +++ b/packages/react-native-codegen/e2e/namespaced/__tests__/components/__snapshots__/GeneratePropsJavaInterface-test.js.snap @@ -2,7 +2,7 @@ exports[`GeneratePropsJavaInterface can generate for 'ArrayPropsNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -11,27 +11,26 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ArrayPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setNames(T view, @Nullable ReadableArray value); - void setDisableds(T view, @Nullable ReadableArray value); - void setProgress(T view, @Nullable ReadableArray value); - void setRadii(T view, @Nullable ReadableArray value); - void setColors(T view, @Nullable ReadableArray value); - void setSrcs(T view, @Nullable ReadableArray value); - void setPoints(T view, @Nullable ReadableArray value); - void setEdgeInsets(T view, @Nullable ReadableArray value); - void setDimensions(T view, @Nullable ReadableArray value); - void setSizes(T view, @Nullable ReadableArray value); - void setObject(T view, @Nullable ReadableArray value); - void setArrayOfObjects(T view, @Nullable ReadableArray value); - void setArrayOfMixed(T view, @Nullable ReadableArray value); +public interface ArrayPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setNames(view: T, value: ReadableArray?): Unit + public fun setDisableds(view: T, value: ReadableArray?): Unit + public fun setProgress(view: T, value: ReadableArray?): Unit + public fun setRadii(view: T, value: ReadableArray?): Unit + public fun setColors(view: T, value: ReadableArray?): Unit + public fun setSrcs(view: T, value: ReadableArray?): Unit + public fun setPoints(view: T, value: ReadableArray?): Unit + public fun setEdgeInsets(view: T, value: ReadableArray?): Unit + public fun setDimensions(view: T, value: ReadableArray?): Unit + public fun setSizes(view: T, value: ReadableArray?): Unit + public fun setObject(view: T, value: ReadableArray?): Unit + public fun setArrayOfObjects(view: T, value: ReadableArray?): Unit + public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit } ", } @@ -39,7 +38,7 @@ public interface ArrayPropsNativeComponentViewManagerInterface e exports[`GeneratePropsJavaInterface can generate for 'BooleanPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -48,15 +47,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface BooleanPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); - void setDisabledNullable(T view, @Nullable Boolean value); +public interface BooleanPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit + public fun setDisabledNullable(view: T, value: Boolean?): Unit } ", } @@ -64,7 +62,7 @@ public interface BooleanPropNativeComponentViewManagerInterface exports[`GeneratePropsJavaInterface can generate for 'ColorPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -73,14 +71,13 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ColorPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setTintColor(T view, @Nullable Integer value); +public interface ColorPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setTintColor(view: T, value: Int?): Unit } ", } @@ -88,7 +85,7 @@ public interface ColorPropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'DimensionPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -97,15 +94,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; import com.facebook.yoga.YogaValue; -public interface DimensionPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setMarginBack(T view, @Nullable YogaValue value); +public interface DimensionPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setMarginBack(view: T, value: YogaValue?): Unit } ", } @@ -113,7 +109,7 @@ public interface DimensionPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { +public interface EdgeInsetsPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { // No props } ", @@ -136,7 +132,7 @@ public interface EdgeInsetsPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setAlignment(T view, @Nullable String value); - void setIntervals(T view, @Nullable Integer value); +public interface EnumPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setAlignment(view: T, value: String?): Unit + public fun setIntervals(view: T, value: Int?): Unit } ", } @@ -161,7 +156,7 @@ public interface EnumPropNativeComponentViewManagerInterface ext exports[`GeneratePropsJavaInterface can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -170,13 +165,13 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface EventNestedObjectPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface EventNestedObjectPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -184,7 +179,7 @@ public interface EventNestedObjectPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface EventPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -207,7 +202,7 @@ public interface EventPropsNativeComponentViewManagerInterface e exports[`GeneratePropsJavaInterface can generate for 'FloatPropsNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -216,20 +211,19 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface FloatPropsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setBlurRadius(T view, float value); - void setBlurRadius2(T view, float value); - void setBlurRadius3(T view, float value); - void setBlurRadius4(T view, float value); - void setBlurRadius5(T view, float value); - void setBlurRadius6(T view, float value); - void setBlurRadiusNullable(T view, @Nullable Float value); +public interface FloatPropsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setBlurRadius(view: T, value: Float): Unit + public fun setBlurRadius2(view: T, value: Float): Unit + public fun setBlurRadius3(view: T, value: Float): Unit + public fun setBlurRadius4(view: T, value: Float): Unit + public fun setBlurRadius5(view: T, value: Float): Unit + public fun setBlurRadius6(view: T, value: Float): Unit + public fun setBlurRadiusNullable(view: T, value: Float?): Unit } ", } @@ -237,7 +231,7 @@ public interface FloatPropsNativeComponentViewManagerInterface e exports[`GeneratePropsJavaInterface can generate for 'ImagePropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -246,15 +240,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ImagePropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setThumbImage(T view, @Nullable ReadableMap value); +public interface ImagePropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setThumbImage(view: T, value: ReadableMap?): Unit } ", } @@ -262,7 +255,7 @@ public interface ImagePropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'IntegerPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -271,15 +264,15 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface IntegerPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setProgress1(T view, int value); - void setProgress2(T view, int value); - void setProgress3(T view, int value); +public interface IntegerPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setProgress1(view: T, value: Int): Unit + public fun setProgress2(view: T, value: Int): Unit + public fun setProgress3(view: T, value: Int): Unit } ", } @@ -287,7 +280,7 @@ public interface IntegerPropNativeComponentViewManagerInterface exports[`GeneratePropsJavaInterface can generate for 'InterfaceOnlyNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -296,14 +289,13 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface InterfaceOnlyNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setTitle(T view, @Nullable String value); +public interface InterfaceOnlyNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setTitle(view: T, value: String?): Unit } ", } @@ -311,7 +303,7 @@ public interface InterfaceOnlyNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setMixedProp(T view, Dynamic value); +public interface MixedPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setMixedProp(view: T, value: Dynamic): Unit } ", } @@ -335,7 +327,7 @@ public interface MixedPropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'MultiNativePropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -344,18 +336,17 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MultiNativePropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setThumbImage(T view, @Nullable ReadableMap value); - void setColor(T view, @Nullable Integer value); - void setThumbTintColor(T view, @Nullable Integer value); - void setPoint(T view, @Nullable ReadableMap value); +public interface MultiNativePropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setThumbImage(view: T, value: ReadableMap?): Unit + public fun setColor(view: T, value: Int?): Unit + public fun setThumbTintColor(view: T, value: Int?): Unit + public fun setPoint(view: T, value: ReadableMap?): Unit } ", } @@ -363,7 +354,7 @@ public interface MultiNativePropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { +public interface NoPropsNoEventsNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { // No props } ", @@ -386,7 +377,7 @@ public interface NoPropsNoEventsNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setObjectProp(T view, @Nullable ReadableMap value); - void setObjectArrayProp(T view, @Nullable ReadableMap value); - void setObjectPrimitiveRequiredProp(T view, @Nullable ReadableMap value); +public interface ObjectPropsNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setObjectProp(view: T, value: ReadableMap?): Unit + public fun setObjectArrayProp(view: T, value: ReadableMap?): Unit + public fun setObjectPrimitiveRequiredProp(view: T, value: ReadableMap?): Unit } ", } @@ -413,7 +403,7 @@ public interface ObjectPropsNativeComponentManagerInterface exte exports[`GeneratePropsJavaInterface can generate for 'PointPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -422,15 +412,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface PointPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setStartPoint(T view, @Nullable ReadableMap value); +public interface PointPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setStartPoint(view: T, value: ReadableMap?): Unit } ", } @@ -438,7 +427,7 @@ public interface PointPropNativeComponentViewManagerInterface ex exports[`GeneratePropsJavaInterface can generate for 'StringPropNativeComponent.js' 1`] = ` Object { - "java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.java": "/** + "java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.kt": "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -447,15 +436,14 @@ Object { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface StringPropNativeComponentViewManagerInterface extends ViewManagerWithGeneratedInterface { - void setPlaceholder(T view, @Nullable String value); - void setDefaultValue(T view, @Nullable String value); +public interface StringPropNativeComponentViewManagerInterface: ViewManagerWithGeneratedInterface { + public fun setPlaceholder(view: T, value: String?): Unit + public fun setDefaultValue(view: T, value: String?): Unit } ", } diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js index 66ab2267d84..563e0ee3fbe 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaInterface.js @@ -48,19 +48,15 @@ const FileTemplate = ({ * ${'@'}generated by codegen project: GeneratePropsJavaInterface.js */ -package ${packageName}; +package ${packageName} ${imports} -public interface ${className} extends ViewManagerWithGeneratedInterface { +public interface ${className}: ViewManagerWithGeneratedInterface { ${methods} } `; -function addNullable(imports: Set) { - imports.add('import androidx.annotation.Nullable;'); -} - function getJavaValueForProp( prop: NamedShape, imports: Set, @@ -70,65 +66,52 @@ function getJavaValueForProp( switch (typeAnnotation.type) { case 'BooleanTypeAnnotation': if (typeAnnotation.default === null) { - addNullable(imports); - return '@Nullable Boolean value'; + return 'value: Boolean?'; } else { - return 'boolean value'; + return 'value: Boolean'; } case 'StringTypeAnnotation': - addNullable(imports); - return '@Nullable String value'; + return 'value: String?'; case 'Int32TypeAnnotation': - return 'int value'; + return 'value: Int'; case 'DoubleTypeAnnotation': - return 'double value'; + return 'value: Double'; case 'FloatTypeAnnotation': if (typeAnnotation.default === null) { - addNullable(imports); - return '@Nullable Float value'; + return 'value: Float?'; } else { - return 'float value'; + return 'value: Float'; } case 'ReservedPropTypeAnnotation': switch (typeAnnotation.name) { case 'ColorPrimitive': - addNullable(imports); - return '@Nullable Integer value'; + return 'value: Int?'; case 'ImageSourcePrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; + return 'value: ReadableMap?'; case 'ImageRequestPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; + return 'value: ReadableMap?'; case 'PointPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; + return 'value: ReadableMap?'; case 'EdgeInsetsPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; + return 'value: ReadableMap?'; case 'DimensionPrimitive': - addNullable(imports); - return '@Nullable YogaValue value'; + return 'value: YogaValue?'; default: (typeAnnotation.name: empty); throw new Error('Received unknown ReservedPropTypeAnnotation'); } case 'ArrayTypeAnnotation': { - addNullable(imports); - return '@Nullable ReadableArray value'; + return 'value: ReadableArray?'; } case 'ObjectTypeAnnotation': { - addNullable(imports); - return '@Nullable ReadableMap value'; + return 'value: ReadableMap?'; } case 'StringEnumTypeAnnotation': - addNullable(imports); - return '@Nullable String value'; + return 'value: String?'; case 'Int32EnumTypeAnnotation': - addNullable(imports); - return '@Nullable Integer value'; + return 'value: Int?'; case 'MixedTypeAnnotation': - return 'Dynamic value'; + return 'value: Dynamic'; default: (typeAnnotation: empty); throw new Error('Received invalid typeAnnotation'); @@ -142,9 +125,9 @@ function generatePropsString(component: ComponentShape, imports: Set) { return component.props .map(prop => { - return `void set${toSafeJavaString( + return `public fun set${toSafeJavaString( prop.name, - )}(T view, ${getJavaValueForProp(prop, imports)});`; + )}(view: T, ${getJavaValueForProp(prop, imports)}): Unit`; }) .join('\n' + ' '); } @@ -156,19 +139,19 @@ function getCommandArgJavaType(param: NamedShape) { case 'ReservedTypeAnnotation': switch (typeAnnotation.name) { case 'RootTag': - return 'double'; + return 'Double'; default: (typeAnnotation.name: empty); throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); } case 'BooleanTypeAnnotation': - return 'boolean'; + return 'Boolean'; case 'DoubleTypeAnnotation': - return 'double'; + return 'Double'; case 'FloatTypeAnnotation': - return 'float'; + return 'Float'; case 'Int32TypeAnnotation': - return 'int'; + return 'Int'; case 'StringTypeAnnotation': return 'String'; case 'ArrayTypeAnnotation': @@ -184,11 +167,11 @@ function getCommandArguments( componentName: string, ): string { return [ - 'T view', + 'view: T', ...command.typeAnnotation.params.map(param => { const commandArgJavaType = getCommandArgJavaType(param); - return `${commandArgJavaType} ${param.name}`; + return `${param.name}: ${commandArgJavaType}`; }), ].join(', '); } @@ -201,10 +184,10 @@ function generateCommandsString( .map(command => { const safeJavaName = toSafeJavaString(command.name, false); - return `void ${safeJavaName}(${getCommandArguments( + return `public fun ${safeJavaName}(${getCommandArguments( command, componentName, - )});`; + )}): Unit`; }) .join('\n' + ' '); } @@ -287,7 +270,7 @@ module.exports = { .trimRight(), }); - files.set(`${outputDir}/${className}.java`, replacedTemplate); + files.set(`${outputDir}/${className}.kt`, replacedTemplate); }); }); diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaInterface-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaInterface-test.js.snap index 5398cbdf686..58da46cf3aa 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaInterface-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsJavaInterface-test.js.snap @@ -2,7 +2,7 @@ exports[`GeneratePropsJavaInterface can generate fixture ARRAY_PROPS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -11,27 +11,26 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ArrayPropsNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setNames(T view, @Nullable ReadableArray value); - void setDisableds(T view, @Nullable ReadableArray value); - void setProgress(T view, @Nullable ReadableArray value); - void setRadii(T view, @Nullable ReadableArray value); - void setColors(T view, @Nullable ReadableArray value); - void setSrcs(T view, @Nullable ReadableArray value); - void setPoints(T view, @Nullable ReadableArray value); - void setDimensions(T view, @Nullable ReadableArray value); - void setSizes(T view, @Nullable ReadableArray value); - void setObject(T view, @Nullable ReadableArray value); - void setArray(T view, @Nullable ReadableArray value); - void setArrayOfArrayOfObject(T view, @Nullable ReadableArray value); - void setArrayOfMixed(T view, @Nullable ReadableArray value); +public interface ArrayPropsNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setNames(view: T, value: ReadableArray?): Unit + public fun setDisableds(view: T, value: ReadableArray?): Unit + public fun setProgress(view: T, value: ReadableArray?): Unit + public fun setRadii(view: T, value: ReadableArray?): Unit + public fun setColors(view: T, value: ReadableArray?): Unit + public fun setSrcs(view: T, value: ReadableArray?): Unit + public fun setPoints(view: T, value: ReadableArray?): Unit + public fun setDimensions(view: T, value: ReadableArray?): Unit + public fun setSizes(view: T, value: ReadableArray?): Unit + public fun setObject(view: T, value: ReadableArray?): Unit + public fun setArray(view: T, value: ReadableArray?): Unit + public fun setArrayOfArrayOfObject(view: T, value: ReadableArray?): Unit + public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit } ", } @@ -39,7 +38,7 @@ public interface ArrayPropsNativeComponentManagerInterface exten exports[`GeneratePropsJavaInterface can generate fixture ARRAY_PROPS_WITH_NESTED_OBJECT 1`] = ` Map { - "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -48,15 +47,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ArrayPropsNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setNativePrimitives(T view, @Nullable ReadableArray value); +public interface ArrayPropsNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setNativePrimitives(view: T, value: ReadableArray?): Unit } ", } @@ -64,7 +62,7 @@ public interface ArrayPropsNativeComponentManagerInterface exten exports[`GeneratePropsJavaInterface can generate fixture BOOLEAN_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/BooleanPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/BooleanPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -73,13 +71,13 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface BooleanPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface BooleanPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -87,7 +85,7 @@ public interface BooleanPropNativeComponentManagerInterface exte exports[`GeneratePropsJavaInterface can generate fixture COLOR_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/ColorPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/ColorPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -96,14 +94,13 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ColorPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setTintColor(T view, @Nullable Integer value); +public interface ColorPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setTintColor(view: T, value: Int?): Unit } ", } @@ -111,7 +108,7 @@ public interface ColorPropNativeComponentManagerInterface extend exports[`GeneratePropsJavaInterface can generate fixture COMMANDS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -120,16 +117,16 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface CommandNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { +public interface CommandNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { // No props - void flashScrollIndicators(T view); - void allTypes(T view, int x, float y, double z, String message, boolean animated, ReadableArray locations); + public fun flashScrollIndicators(view: T): Unit + public fun allTypes(view: T, x: Int, y: Float, z: Double, message: String, animated: Boolean, locations: ReadableArray): Unit } ", } @@ -137,7 +134,7 @@ public interface CommandNativeComponentManagerInterface extends exports[`GeneratePropsJavaInterface can generate fixture COMMANDS_AND_PROPS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -146,18 +143,17 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface CommandNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setAccessibilityHint(T view, @Nullable String value); - void handleRootTag(T view, double rootTag); - void hotspotUpdate(T view, int x, int y); - void addItems(T view, ReadableArray items); +public interface CommandNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setAccessibilityHint(view: T, value: String?): Unit + public fun handleRootTag(view: T, rootTag: Double): Unit + public fun hotspotUpdate(view: T, x: Int, y: Int): Unit + public fun addItems(view: T, items: ReadableArray): Unit } ", } @@ -165,7 +161,7 @@ public interface CommandNativeComponentManagerInterface extends exports[`GeneratePropsJavaInterface can generate fixture DIMENSION_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/DimensionPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/DimensionPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -174,15 +170,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; import com.facebook.yoga.YogaValue; -public interface DimensionPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setMarginBack(T view, @Nullable YogaValue value); +public interface DimensionPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setMarginBack(view: T, value: YogaValue?): Unit } ", } @@ -190,7 +185,7 @@ public interface DimensionPropNativeComponentManagerInterface ex exports[`GeneratePropsJavaInterface can generate fixture DOUBLE_PROPS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -199,18 +194,18 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface DoublePropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setBlurRadius(T view, double value); - void setBlurRadius2(T view, double value); - void setBlurRadius3(T view, double value); - void setBlurRadius4(T view, double value); - void setBlurRadius5(T view, double value); - void setBlurRadius6(T view, double value); +public interface DoublePropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setBlurRadius(view: T, value: Double): Unit + public fun setBlurRadius2(view: T, value: Double): Unit + public fun setBlurRadius3(view: T, value: Double): Unit + public fun setBlurRadius4(view: T, value: Double): Unit + public fun setBlurRadius5(view: T, value: Double): Unit + public fun setBlurRadius6(view: T, value: Double): Unit } ", } @@ -218,7 +213,7 @@ public interface DoublePropNativeComponentManagerInterface exten exports[`GeneratePropsJavaInterface can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/EventsNestedObjectNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/EventsNestedObjectNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -227,13 +222,13 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface EventsNestedObjectNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface EventsNestedObjectNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -241,7 +236,7 @@ public interface EventsNestedObjectNativeComponentManagerInterface "/** + "java/com/facebook/react/viewmanagers/EventsNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -250,13 +245,13 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface EventsNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface EventsNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -264,7 +259,7 @@ public interface EventsNativeComponentManagerInterface extends V exports[`GeneratePropsJavaInterface can generate fixture EVENTS_WITH_PAPER_NAME 1`] = ` Map { - "java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -273,12 +268,12 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface InterfaceOnlyComponentManagerInterface extends ViewManagerWithGeneratedInterface { +public interface InterfaceOnlyComponentManagerInterface: ViewManagerWithGeneratedInterface { // No props } ", @@ -291,7 +286,7 @@ exports[`GeneratePropsJavaInterface can generate fixture EXCLUDE_ANDROID_IOS 1`] exports[`GeneratePropsJavaInterface can generate fixture EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES 1`] = ` Map { - "java/com/facebook/react/viewmanagers/ExcludedIosComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/ExcludedIosComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -300,16 +295,16 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ExcludedIosComponentManagerInterface extends ViewManagerWithGeneratedInterface { +public interface ExcludedIosComponentManagerInterface: ViewManagerWithGeneratedInterface { // No props } ", - "java/com/facebook/react/viewmanagers/MultiFileIncludedNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/MultiFileIncludedNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -318,13 +313,13 @@ public interface ExcludedIosComponentManagerInterface extends Vi * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MultiFileIncludedNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface MultiFileIncludedNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -332,7 +327,7 @@ public interface MultiFileIncludedNativeComponentManagerInterface "/** + "java/com/facebook/react/viewmanagers/FloatPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -341,18 +336,18 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface FloatPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setBlurRadius(T view, float value); - void setBlurRadius2(T view, float value); - void setBlurRadius3(T view, float value); - void setBlurRadius4(T view, float value); - void setBlurRadius5(T view, float value); - void setBlurRadius6(T view, float value); +public interface FloatPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setBlurRadius(view: T, value: Float): Unit + public fun setBlurRadius2(view: T, value: Float): Unit + public fun setBlurRadius3(view: T, value: Float): Unit + public fun setBlurRadius4(view: T, value: Float): Unit + public fun setBlurRadius5(view: T, value: Float): Unit + public fun setBlurRadius6(view: T, value: Float): Unit } ", } @@ -360,7 +355,7 @@ public interface FloatPropNativeComponentManagerInterface extend exports[`GeneratePropsJavaInterface can generate fixture IMAGE_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/ImagePropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/ImagePropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -369,15 +364,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ImagePropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setThumbImage(T view, @Nullable ReadableMap value); +public interface ImagePropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setThumbImage(view: T, value: ReadableMap?): Unit } ", } @@ -385,7 +379,7 @@ public interface ImagePropNativeComponentManagerInterface extend exports[`GeneratePropsJavaInterface can generate fixture INSETS_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/InsetsPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/InsetsPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -394,15 +388,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface InsetsPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setContentInset(T view, @Nullable ReadableMap value); +public interface InsetsPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setContentInset(view: T, value: ReadableMap?): Unit } ", } @@ -410,7 +403,7 @@ public interface InsetsPropNativeComponentManagerInterface exten exports[`GeneratePropsJavaInterface can generate fixture INT32_ENUM_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/Int32EnumPropsNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/Int32EnumPropsNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -419,14 +412,13 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface Int32EnumPropsNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setMaxInterval(T view, @Nullable Integer value); +public interface Int32EnumPropsNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setMaxInterval(view: T, value: Int?): Unit } ", } @@ -434,7 +426,7 @@ public interface Int32EnumPropsNativeComponentManagerInterface e exports[`GeneratePropsJavaInterface can generate fixture INTEGER_PROPS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/IntegerPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/IntegerPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -443,15 +435,15 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface IntegerPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setProgress1(T view, int value); - void setProgress2(T view, int value); - void setProgress3(T view, int value); +public interface IntegerPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setProgress1(view: T, value: Int): Unit + public fun setProgress2(view: T, value: Int): Unit + public fun setProgress3(view: T, value: Int): Unit } ", } @@ -459,7 +451,7 @@ public interface IntegerPropNativeComponentManagerInterface exte exports[`GeneratePropsJavaInterface can generate fixture INTERFACE_ONLY 1`] = ` Map { - "java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -468,14 +460,13 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface InterfaceOnlyComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setAccessibilityHint(T view, @Nullable String value); +public interface InterfaceOnlyComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setAccessibilityHint(view: T, value: String?): Unit } ", } @@ -483,7 +474,7 @@ public interface InterfaceOnlyComponentManagerInterface extends exports[`GeneratePropsJavaInterface can generate fixture MIXED_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/MixedPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/MixedPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -492,14 +483,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.bridge.Dynamic; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MixedPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setMixedProp(T view, Dynamic value); +public interface MixedPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setMixedProp(view: T, value: Dynamic): Unit } ", } @@ -507,7 +498,7 @@ public interface MixedPropNativeComponentManagerInterface extend exports[`GeneratePropsJavaInterface can generate fixture MULTI_NATIVE_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/ImageColorPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/ImageColorPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -516,18 +507,17 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ImageColorPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setThumbImage(T view, @Nullable ReadableMap value); - void setColor(T view, @Nullable Integer value); - void setThumbTintColor(T view, @Nullable Integer value); - void setPoint(T view, @Nullable ReadableMap value); +public interface ImageColorPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setThumbImage(view: T, value: ReadableMap?): Unit + public fun setColor(view: T, value: Int?): Unit + public fun setThumbTintColor(view: T, value: Int?): Unit + public fun setPoint(view: T, value: ReadableMap?): Unit } ", } @@ -535,7 +525,7 @@ public interface ImageColorPropNativeComponentManagerInterface e exports[`GeneratePropsJavaInterface can generate fixture NO_PROPS_NO_EVENTS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/NoPropsNoEventsComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/NoPropsNoEventsComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -544,12 +534,12 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface NoPropsNoEventsComponentManagerInterface extends ViewManagerWithGeneratedInterface { +public interface NoPropsNoEventsComponentManagerInterface: ViewManagerWithGeneratedInterface { // No props } ", @@ -558,7 +548,7 @@ public interface NoPropsNoEventsComponentManagerInterface extend exports[`GeneratePropsJavaInterface can generate fixture OBJECT_PROPS 1`] = ` Map { - "java/com/facebook/react/viewmanagers/ObjectPropsManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/ObjectPropsManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -567,15 +557,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface ObjectPropsManagerInterface extends ViewManagerWithGeneratedInterface { - void setObjectProp(T view, @Nullable ReadableMap value); +public interface ObjectPropsManagerInterface: ViewManagerWithGeneratedInterface { + public fun setObjectProp(view: T, value: ReadableMap?): Unit } ", } @@ -583,7 +572,7 @@ public interface ObjectPropsManagerInterface extends ViewManager exports[`GeneratePropsJavaInterface can generate fixture POINT_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/PointPropNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/PointPropNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -592,15 +581,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface PointPropNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setStartPoint(T view, @Nullable ReadableMap value); +public interface PointPropNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setStartPoint(view: T, value: ReadableMap?): Unit } ", } @@ -608,7 +596,7 @@ public interface PointPropNativeComponentManagerInterface extend exports[`GeneratePropsJavaInterface can generate fixture STRING_ENUM_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/StringEnumPropsNativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/StringEnumPropsNativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -617,14 +605,13 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface StringEnumPropsNativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setAlignment(T view, @Nullable String value); +public interface StringEnumPropsNativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setAlignment(view: T, value: String?): Unit } ", } @@ -632,7 +619,7 @@ public interface StringEnumPropsNativeComponentManagerInterface exports[`GeneratePropsJavaInterface can generate fixture STRING_PROP 1`] = ` Map { - "java/com/facebook/react/viewmanagers/StringPropComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/StringPropComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -641,15 +628,14 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; -import androidx.annotation.Nullable; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface StringPropComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setAccessibilityHint(T view, @Nullable String value); - void setAccessibilityRole(T view, @Nullable String value); +public interface StringPropComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setAccessibilityHint(view: T, value: String?): Unit + public fun setAccessibilityRole(view: T, value: String?): Unit } ", } @@ -657,7 +643,7 @@ public interface StringPropComponentManagerInterface extends Vie exports[`GeneratePropsJavaInterface can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = ` Map { - "java/com/facebook/react/viewmanagers/MultiFile1NativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/MultiFile1NativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -666,16 +652,16 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MultiFile1NativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface MultiFile1NativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", - "java/com/facebook/react/viewmanagers/MultiFile2NativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/MultiFile2NativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -684,13 +670,13 @@ public interface MultiFile1NativeComponentManagerInterface exten * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MultiFile2NativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface MultiFile2NativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", } @@ -698,7 +684,7 @@ public interface MultiFile2NativeComponentManagerInterface exten exports[`GeneratePropsJavaInterface can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = ` Map { - "java/com/facebook/react/viewmanagers/MultiComponent1NativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/MultiComponent1NativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -707,16 +693,16 @@ Map { * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MultiComponent1NativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface MultiComponent1NativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", - "java/com/facebook/react/viewmanagers/MultiComponent2NativeComponentManagerInterface.java" => "/** + "java/com/facebook/react/viewmanagers/MultiComponent2NativeComponentManagerInterface.kt" => "/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost @@ -725,13 +711,13 @@ public interface MultiComponent1NativeComponentManagerInterface * @generated by codegen project: GeneratePropsJavaInterface.js */ -package com.facebook.react.viewmanagers; +package com.facebook.react.viewmanagers import android.view.View; import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface; -public interface MultiComponent2NativeComponentManagerInterface extends ViewManagerWithGeneratedInterface { - void setDisabled(T view, boolean value); +public interface MultiComponent2NativeComponentManagerInterface: ViewManagerWithGeneratedInterface { + public fun setDisabled(view: T, value: Boolean): Unit } ", }