/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: MIT-0 */ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.3.50' ext.dokka_version = '0.10.1' repositories { maven { url "https://plugins.gradle.org/m2/" } google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.3.1" classpath("org.jlleitschuh.gradle:ktlint-gradle:9.1.1") classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}" classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.2' classpath 'com.google.gms:google-services:4.3.10' } } plugins { id "io.gitlab.arturbosch.detekt" version "1.3.1" id "org.jlleitschuh.gradle.ktlint" version "9.1.1" } apply plugin: 'io.gitlab.arturbosch.detekt' apply plugin: 'org.jlleitschuh.gradle.ktlint' def localPropertiesFile = new File(getRootDir(), "local.properties") Properties localProperties = new Properties() if (localPropertiesFile.exists()) { localPropertiesFile.withInputStream { instr -> localProperties.load(instr) } } allprojects { repositories { google() jcenter() flatDir { dirs '../amazon-chime-sdk/libs' } } project.ext { chimeBuildToolsVersion = "29.0.2" chimeMinSdkVersion = 21 chimeTargetSdkVersion = 28 chimeCompileSdkVersion = 29 sdkDir = localProperties.getProperty('sdk.dir') ndkDir = localProperties.getProperty('ndk.dir') } } subprojects { apply plugin: "org.jlleitschuh.gradle.ktlint" } task clean(type: Delete) { delete rootProject.buildDir } task installGitHook(type: Copy) { from new File(rootProject.rootDir, 'pre-commit') into { new File(rootProject.rootDir, '.git/hooks') } fileMode 0744 } tasks.getByPath(':app:preBuild').dependsOn installGitHook