Skip to content

Commit

Permalink
Merge pull request #17 from tenjin/dg/expo-codegen-fix
Browse files Browse the repository at this point in the history
Release 1.2.1: Expo Codegen Support
  • Loading branch information
giraldogdiego authored Jan 30, 2025
2 parents 72e7ed5 + d3dcdc2 commit 5120fbc
Show file tree
Hide file tree
Showing 66 changed files with 2,594 additions and 197 deletions.
15 changes: 9 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ jsconfig.json

# Xcode
#
build/
example/android/build
example/android/app/build
android/app/build
android/build/.transforms
android/build/intermediates
android/build/kotlin
android/build/outputs
android/build/tmp
example/ios/build
*.pbxuser
!default.pbxuser
*.mode1v3
Expand Down Expand Up @@ -75,8 +83,3 @@ android/keystores/debug.keystore
.turbo/

# generated by bob
lib/

# React Native Codegen
ios/generated
android/generated
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ android {
java.srcDirs += [
"src/newarch",
// Codegen specs
"generated/java",
"generated/jni"
"build/generated/source/codegen/java",
"build/generated/source/codegen/jni"
]
} else {
java.srcDirs += ["src/oldarch"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.tenjin;

public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.tenjin";
public static final String BUILD_TYPE = "debug";
// Field from default config.
public static final boolean IS_NEW_ARCHITECTURE_ENABLED = true;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@

/**
* 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
* once the code is regenerated.
*
* @generated by codegen project: GenerateModuleJavaSpec.js
*
* @nolint
*/

package com.tenjin;

import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
import javax.annotation.Nonnull;

public abstract class NativeTenjinSpec extends ReactContextBaseJavaModule implements TurboModule {
public static final String NAME = "Tenjin";

public NativeTenjinSpec(ReactApplicationContext reactContext) {
super(reactContext);
}

@Override
public @Nonnull String getName() {
return NAME;
}

@ReactMethod
@DoNotStrip
public abstract void initialize(String apiKey);

@ReactMethod
@DoNotStrip
public abstract void connect();

@ReactMethod
@DoNotStrip
public abstract void optIn();

@ReactMethod
@DoNotStrip
public abstract void optOut();

@ReactMethod
@DoNotStrip
public abstract void optInParams(ReadableArray params);

@ReactMethod
@DoNotStrip
public abstract void optOutParams(ReadableArray params);

@ReactMethod
@DoNotStrip
public abstract void optInOutUsingCMP();

@ReactMethod
@DoNotStrip
public abstract void optOutGoogleDMA();

@ReactMethod
@DoNotStrip
public abstract void optInGoogleDMA();

@ReactMethod
@DoNotStrip
public abstract void setAppStore(String type);

@ReactMethod
@DoNotStrip
public abstract void transaction(String productName, String currencyCode, double quantity, double unitPrice);

@ReactMethod
@DoNotStrip
public abstract void transactionWithReceipt(String productName, String currencyCode, double quantity, double unitPrice, String transaction, String data);

@ReactMethod
@DoNotStrip
public abstract void eventWithName(String name);

@ReactMethod
@DoNotStrip
public abstract void eventWithNameAndValue(String name, String value);

@ReactMethod
@DoNotStrip
public abstract void appendAppSubversion(double version);

@ReactMethod
@DoNotStrip
public abstract void updatePostbackConversionValue(double conversionValue);

@ReactMethod
@DoNotStrip
public abstract void updatePostbackConversionValueWithCoarseValue(double conversionValue, String coarseValue);

@ReactMethod
@DoNotStrip
public abstract void updatePostbackConversionValueWithCoarseValueAndLockWindow(double conversionValue, String coarseValue, boolean lockWindow);

@ReactMethod
@DoNotStrip
public abstract void getAttributionInfo(Callback successCallback, Callback errorCallback);

@ReactMethod
@DoNotStrip
public abstract void eventAdImpressionAdMob(ReadableMap json);

@ReactMethod
@DoNotStrip
public abstract void eventAdImpressionAppLovin(ReadableMap json);

@ReactMethod
@DoNotStrip
public abstract void eventAdImpressionHyperBid(ReadableMap json);

@ReactMethod
@DoNotStrip
public abstract void eventAdImpressionIronSource(ReadableMap json);

@ReactMethod
@DoNotStrip
public abstract void eventAdImpressionTopOn(ReadableMap json);

@ReactMethod
@DoNotStrip
public abstract void eventAdImpressionTradPlus(ReadableMap json);

@ReactMethod
@DoNotStrip
public abstract void setCustomerUserId(String userId);

@ReactMethod
@DoNotStrip
public abstract void getCustomerUserId(Callback callback);

@ReactMethod
@DoNotStrip
public abstract void getAnalyticsInstallationId(Callback callback);

@ReactMethod
@DoNotStrip
public abstract void setGoogleDMAParameters(boolean adPersonalization, boolean adUserData);
}
36 changes: 36 additions & 0 deletions android/build/generated/source/codegen/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)

file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNTenjinSpec/*.cpp)

add_library(
react_codegen_RNTenjinSpec
OBJECT
${react_codegen_SRCS}
)

target_include_directories(react_codegen_RNTenjinSpec PUBLIC . react/renderer/components/RNTenjinSpec)

target_link_libraries(
react_codegen_RNTenjinSpec
fbjni
jsi
# We need to link different libraries based on whether we are building rncore or not, that's necessary
# because we want to break a circular dependency between react_codegen_rncore and reactnative
reactnative
)

target_compile_options(
react_codegen_RNTenjinSpec
PRIVATE
-DLOG_TAG=\"ReactNative\"
-fexceptions
-frtti
-std=c++20
-Wall
)
Loading

0 comments on commit 5120fbc

Please sign in to comment.