Skip to content

Commit

Permalink
[Android] Remove maven dependency of flatbuffers and use source folder
Browse files Browse the repository at this point in the history
  • Loading branch information
paulovap committed Sep 1, 2022
1 parent 37e37b8 commit b31ec27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 26 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -294,7 +294,6 @@ jobs:
run: echo "::set-output name=hashes::$(shasum -a 256 Mac.flatc.binary.zip | base64)"

build-android:
if: false
name: Build Android (on Linux)
runs-on: ubuntu-latest
steps:
Expand Down
36 changes: 11 additions & 25 deletions android/app/build.gradle
Expand Up @@ -18,6 +18,14 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

sourceSets {
main {
java {
srcDir '../../java'
}
}
}

ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a'
}
Expand Down Expand Up @@ -105,37 +113,15 @@ android {
dependsOn(generateFbsCpp)
}
}

// flavorDimensions "stl-variant"
// productFlavors {
// gnustl {
// dimension "stl-variant"
// applicationIdSuffix ".gnustl"
// versionNameSuffix "-gnustl"
// externalNativeBuild {
// ndkBuild {
// arguments "APP_STL=gnustl_static"
// }
// }
// }
// libcpp {
// dimension "stl-variant"
// applicationIdSuffix ".libcpp"
// versionNameSuffix "-libcpp"
// externalNativeBuild {
// ndkBuild {
// arguments "APP_STL=c++_static"
// }
// }
// }
// }
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.flatbuffers:flatbuffers-java:2.0.0'

// If you using java runtime you can add its dependency as the example below
// implementation 'com.google.flatbuffers:flatbuffers-java:$latest_version'

}

0 comments on commit b31ec27

Please sign in to comment.