blob: 33968a0e27aec1675af525c7e2700e63cef1fd7b [file] [log] [blame]
import org.gradle.internal.os.OperatingSystem;
apply plugin: 'com.android.application'
def stlType = 'c++_static'
android {
compileSdkVersion 31
ndkVersion '23.1.7779620'
defaultConfig {
applicationId "com.tuningfork.insightsdemo"
minSdkVersion 19
targetSdkVersion 31
versionCode 31
versionName "1.0.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=${stlType}"
}
}
}
lintOptions {
abortOnError false
}
buildTypes {
debug {
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
buildFeatures {
prefab true
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
// Uncomment the line below (implementation fileTree...)
// and comment out "implementation project("...")"
// to use a locally built .aar
// See ../settings.gradle as well.
//implementation fileTree(dir: '../../../../', include: ['games-performance-tuner-release.aar',
// 'games-frame-pacing-release.aar'])
implementation project(':games-performance-tuner')
implementation project(':games-frame-pacing')
// GMS Core dependencies
implementation "com.google.android.gms:play-services-clearcut:16.0.0"
testImplementation 'junit:junit:4.12'
}
task createJar(type: GradleBuild) {
buildFile = '../../../../games-performance-tuner/tools/validation/build.gradle'
tasks = ['createJar']
}
def getProtocPath() {
String platformName
if (OperatingSystem.current().isLinux()) platformName = "linux-x86/bin/protoc"
if (OperatingSystem.current().isMacOsX()) platformName = "mac/bin/protoc"
if (OperatingSystem.current().isWindows()) platformName = "win/bin/protoc"
return "../../../../third_party/protoc-3.21.7/" + platformName
}
task buildTuningForkBinFiles(type: JavaExec) {
dependsOn createJar
main "-jar"
args( "../../../../games-performance-tuner/tools/validation/build/libs/TuningforkApkValidationTool.jar",
"--tuningforkPath",
"src/main/assets/tuningfork",
"--protoCompiler",
getProtocPath())
}
tasks.preBuild.dependsOn("buildTuningForkBinFiles")