Newer
Older
arcore / app / build.gradle
Zehaya3 on 13 Dec 2018 2 KB a
/*
 * Copyright 2018 Google LLC
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.google.ar.sceneform.samples.hellosceneform"

        // AR Optional apps must declare minSdkVersion >= 14.
        // AR Required apps must declare minSdkVersion >= 24.
        minSdkVersion 24
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        ndk {
            /*
             * Sceneform is available for the following ABIs:
             * 'arm64-v8a', 'armeabi-v7a', 'x86_64' and 'x86'.
             * Your application should include the ABIs most appropriate to
             * minimize APK size. Listing 'arm64-v8a' is recommended.
             *
             * This sample app includes two ABIs:
             * 1. 'arm64-v8a' to run on devices
             * 2. 'x86' to run in the Android emulator
             */
            abiFilters 'arm64-v8a', 'x86'
        }
    }
    // Sceneform libraries use language constructs from Java 8.
    // Add these compile options if targeting minSdkVersion < 26.
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        abortOnError false
    }
}

dependencies {

    // Provides ArFragment, and other Sceneform UX resources:
    implementation "com.google.ar.sceneform.ux:sceneform-ux:1.5.1"

    // Use the Sceneform Ux Package built from the source files included in the sceneformux folder.
    //api project(":sceneformux")

    // Alternatively, use ArSceneView without the UX dependency.
    //implementation "com.google.ar.sceneform:core:1.5.1"

    implementation "com.android.support:appcompat-v7:27.1.1"
}

apply plugin: 'com.google.ar.sceneform.plugin'

sceneform.asset('sampledata/models/andy.obj',
        'default',
        'sampledata/models/andy.sfa',
        'src/main/res/raw/andy')