source: internals/2016/screencastmultiplayergame_control/branches/MotionDetector3 works well for vertical motion, has detector sensitivity calibration, score calculation is bad/motiondetectorplugin/build.gradle @ 16580

Last change on this file since 16580 was 16580, checked in by jesteves, 3 years ago

Added Motion Detector version that works for vertical motion (phone horizontal to the floor). The calculation of the score for each action is not good.

File size: 1.5 KB
Line 
1apply plugin: 'com.android.library'
2
3android {
4    compileSdkVersion 24
5    buildToolsVersion "24.0.1"
6
7    defaultConfig {
8        minSdkVersion 16
9        targetSdkVersion 22
10        versionCode 1
11        versionName "1.0"
12    }
13    buildTypes {
14        release {
15            minifyEnabled false
16            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17        }
18    }
19}
20
21dependencies {
22    provided files('./libs/UnityPlayer.jar')
23}
24
25android.libraryVariants.all { variant ->
26
27    // Task names.
28    String variantName = "${variant.name.capitalize()}"; // Like 'Debug'
29    String deployTaskGroup = "plugin";
30    String deployTaskName = "deploy${variantName}PluginArchive"; // Like 'deployDebugPluginArchive'
31    String dependencyTaskName = "assemble${variantName}"; // Like 'assembleDebug'
32
33    // Source.
34    String sourceAARFolder = "${buildDir.getPath()}/outputs/aar/";
35    String sourceAARName = "${project.name}-${variant.name}.aar";
36
37    // Target.
38    String targetAssetFolder = "Unity/MultiplayerGame/Assets/Android/MotionDetectorPlugin";
39    String targetAARFolder = "${rootDir.getPath()}/../${targetAssetFolder}"; // Navigate into 'Assets'
40    String targetAARName = "Motion Detector Android Plugin.aar"; // The form you ship your plugin
41
42    // Create task.
43    task(deployTaskName, dependsOn: dependencyTaskName, type: Copy) {
44        from(sourceAARFolder)
45        into(targetAARFolder)
46        include(sourceAARName)
47        rename(sourceAARName, targetAARName)
48    }.group = deployTaskGroup;
49}
Note: See TracBrowser for help on using the repository browser.