Skip to content

Commit

Permalink
Add gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mugikhan committed Sep 12, 2024
1 parent 91d9708 commit e14cb9b
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 26 deletions.
43 changes: 43 additions & 0 deletions packages/op-sqlite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# OSX
#
.DS_Store

# XDE
.expo/

# VSCode
.vscode/
jsconfig.json

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
**/.xcode.env.local

# Android/IJ
#
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
example/.cxx/
*.keystore
!debug.keystore
15 changes: 1 addition & 14 deletions packages/op-sqlite/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ android {
targetSdkVersion safeExtGet('targetSdkVersion', 34)
versionCode 1
versionName "1.0"
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())

externalNativeBuild {
cmake {
Expand Down Expand Up @@ -85,20 +86,6 @@ android {
path "CMakeLists.txt"
}
}

sourceSets.main {
java {
if (isNewArchitectureEnabled()) {
srcDirs += [
"src/turbo",
// This is needed to build Kotlin project with NewArch enabled
"${project.buildDir}/generated/source/codegen/java"
]
} else {
srcDirs += ["src/legacy"]
}
}
}
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.powersync.opsqlite

import com.facebook.react.bridge.Promise
import com.facebook.react.bridge.ReactApplicationContext
import com.powersyncopsqlite.NativePowersyncOpSqliteSpec

class PowersyncOpSqliteModule(context: ReactApplicationContext) : ReactContextBaseJavaModule(context) {
override fun getName(): String = NAME

@ReactMethod
fun foo(a: Double, b: Double, promise: Promise) {
// Use the implementation instance to execute the function.
implementation.foo(a, b, promise)
}

companion object {
const val NAME = "PowersyncOpSqlite"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.powersync.opsqlite;

import android.view.View
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ReactShadowNode
import com.facebook.react.uimanager.ViewManager

class PowersyncOpSqlitePackage : ReactPackage {

override fun createViewManagers(
reactContext: ReactApplicationContext
): MutableList<ViewManager<View, ReactShadowNode<*>>> = mutableListOf()

override fun createNativeModules(
reactContext: ReactApplicationContext
): MutableList<NativeModule> = listOf(PowersyncOpSqliteModule(reactContext)).toMutableList()
}

This file was deleted.

0 comments on commit e14cb9b

Please sign in to comment.