// Copyright (C) 2023 The Android Open Source Project
//
// 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.

include ':torus-wallpaper-settings'
include ':torus-math'
include ':torus-utils'
include ':torus-framework-canvas'
include ':torus-core'
include ':lib-torus'

rootProject.name = "Live Wallpapers Framework"

// Reads wallpaper.build.properties from the project and loads the build
// settings if it exists
def wallpaperBuildProperties = file("wallpaper.build.properties")
def localProperties = new Properties()
if (wallpaperBuildProperties.canRead())
    wallpaperBuildProperties.withInputStream { localProperties.load(it) }

def getWallpaperProperty = { name, defaultValue ->
    if (localProperties.getProperty(name)) {
        return localProperties.getProperty(name)
    }
    return defaultValue
}

gradle.ext.wallpaperMinSdkVersion = getWallpaperProperty('wallpaperMinSdkVersion', 28)
gradle.ext.wallpaperTargetSdkVersion = getWallpaperProperty('wallpaperTargetSdkVersion', 30)
gradle.ext.compileSdkVersion = getWallpaperProperty('compileSdkVersion', 30)
gradle.ext.buildToolsVersion = getWallpaperProperty('buildToolsVersion', '29.0.3')
gradle.ext.kotlinVersion = getWallpaperProperty('kotlinVersion', '1.4.32')
gradle.ext.coreKtxVersion = getWallpaperProperty('coreKtxVersion', '1.6.0')
gradle.ext.androidXLibVersion_alpha = getWallpaperProperty(
        'androidXLibVersion_alpha', '1.1.0-alpha01')

gradle.ext.isPixel = false
