Skip to content

Instantly share code, notes, and snippets.

@JohanJarvi
Created February 26, 2021 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohanJarvi/df29b13f715c13a8553b4f7db5f63e45 to your computer and use it in GitHub Desktop.
Save JohanJarvi/df29b13f715c13a8553b4f7db5f63e45 to your computer and use it in GitHub Desktop.
Build gradle file for the app
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.rcbappnative"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
def gstRoot
if (project.hasProperty('gstAndroidRoot'))
gstRoot = project.gstAndroidRoot
else
gstRoot = System.env.GSTREAMER_ROOT_ANDROID
cmake {
cppFlags ""
}
// TODO: try get this implemented properly as per Gstreamer tutorials?? not sure?? arguments "GSTREAMER_ROOT_ANDROID=$gstRoot"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.10.2"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
// Include local jar files:
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'net.java.dev.jna:jna:4.4.0@aar'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment