mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-27 12:41:49 +00:00
fix: change android package name (#2275)
# Summary Fixes android packageName by changing it in codegen configuration from `com.horcrux.rnsvg` to `com.horcrux.svg` ## Tests Tested with oldest supported `react-native@0.70.0` with an old architecture and everything is working as expected.
This commit is contained in:
@@ -23,7 +23,6 @@ import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.horcrux.rnsvg.NativeSvgRenderableModuleSpec;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.horcrux.rnsvg.NativeSvgViewModuleSpec;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@ReactModule(name = SvgViewModule.NAME)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* @generated by codegen project: GenerateModuleJavaSpec.js
|
||||
* @nolint
|
||||
*/
|
||||
package com.horcrux.rnsvg;
|
||||
package com.horcrux.svg;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.Promise;
|
||||
@@ -17,39 +17,50 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public abstract class NativeSvgRenderableModuleSpec extends ReactContextBaseJavaModule
|
||||
implements TurboModule {
|
||||
public static final String NAME = "RNSVGRenderableModule";
|
||||
|
||||
public abstract class NativeSvgRenderableModuleSpec extends ReactContextBaseJavaModule {
|
||||
public NativeSvgRenderableModuleSpec(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract boolean isPointInFill(Double tag, ReadableMap options);
|
||||
@Override
|
||||
public @Nonnull String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract boolean isPointInStroke(Double tag, ReadableMap options);
|
||||
public abstract boolean isPointInFill(@Nullable Double tag, @Nullable ReadableMap options);
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract double getTotalLength(Double tag);
|
||||
public abstract boolean isPointInStroke(@Nullable Double tag, @Nullable ReadableMap options);
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract WritableMap getPointAtLength(Double tag, ReadableMap options);
|
||||
public abstract double getTotalLength(@Nullable Double tag);
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract WritableMap getBBox(Double tag, ReadableMap options);
|
||||
public abstract WritableMap getPointAtLength(@Nullable Double tag, @Nullable ReadableMap options);
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract WritableMap getCTM(Double tag);
|
||||
public abstract WritableMap getBBox(@Nullable Double tag, @Nullable ReadableMap options);
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract WritableMap getScreenCTM(Double tag);
|
||||
public abstract WritableMap getCTM(@Nullable Double tag);
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
@DoNotStrip
|
||||
public abstract WritableMap getScreenCTM(@Nullable Double tag);
|
||||
|
||||
@ReactMethod
|
||||
@DoNotStrip
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
|
||||
/**
|
||||
* This code was generated by
|
||||
* [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* <p>Do not edit this file as changes may cause incorrect behavior and will be lost once the code
|
||||
* is regenerated.
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
* @generated by codegen project: GenerateModuleJavaSpec.js
|
||||
*
|
||||
* @nolint
|
||||
*/
|
||||
package com.horcrux.rnsvg;
|
||||
|
||||
package com.horcrux.svg;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
@@ -16,13 +18,23 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public abstract class NativeSvgViewModuleSpec extends ReactContextBaseJavaModule implements TurboModule {
|
||||
public static final String NAME = "RNSVGSvgViewModule";
|
||||
|
||||
public abstract class NativeSvgViewModuleSpec extends ReactContextBaseJavaModule {
|
||||
public NativeSvgViewModuleSpec(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nonnull String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
@DoNotStrip
|
||||
public abstract void toDataURL(Double tag, ReadableMap options, Callback callback);
|
||||
public abstract void toDataURL(@Nullable Double tag, @Nullable ReadableMap options, @Nullable Callback callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user