Skip to content

Commit

Permalink
fix(Android): fix android codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 committed Jan 1, 2025
1 parent cb6e914 commit 9c01129
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ android {
if (isNewArchitectureEnabled()) {
java.srcDirs += [
"src/newarch",
// This is needed to build Kotlin project with NewArch enabled
"${project.buildDir}/generated/source/codegen/java"
// Codegen specs
"generated/java",
"generated/jni"
]
} else {
java.srcDirs += ["src/oldarch"]
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,13 @@
"codegenConfig": {
"name": "RNTscPrinterSpec",
"type": "modules",
"jsSrcsDir": "src"
"jsSrcsDir": "src",
"outputDir": {
"android": "android/generated"
},
"android": {
"javaPackageName": "com.tscprinter"
}
},
"create-react-native-library": {
"type": "module-mixed",
Expand Down

0 comments on commit 9c01129

Please sign in to comment.