1// Copyright (C) 2023 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Top-level build file where you can add configuration options common to all sub-projects/modules. 16buildscript { 17 ext.versions = [ 18 'minSdk' : 31, 19 'targetSdk' : 34, 20 'compileSdk' : 34, 21 'buildTools' : '29.0.3', 22 'kotlin' : '1.6.21', 23 'ktx' : '1.5.0-beta02', 24 'material' : '1.2.1', 25 'appcompat' : '1.3.0', 26 'androidXLib': '1.1.0-alpha02' 27 ] 28 29 repositories { 30 google() 31 mavenCentral() 32 } 33 34 dependencies { 35 classpath "com.android.tools.build:gradle:7.4.2" 36 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin" 37 } 38} 39 40allprojects { 41 repositories { 42 google() 43 mavenCentral() 44 } 45} 46 47subprojects { 48 if (name.startsWith("torus")) { 49 version = VERSION_NAME 50 group = GROUP 51 52 apply plugin: 'com.android.library' 53 apply plugin: 'kotlin-android' 54 55 android { 56 namespace "com.google.android.torus" 57 58 compileSdkVersion versions.compileSdk 59 buildToolsVersion versions.buildTools 60 61 defaultConfig { 62 minSdkVersion versions.minSdk 63 targetSdkVersion versions.targetSdk 64 } 65 66 buildTypes { 67 release { 68 minifyEnabled false 69 consumerProguardFiles 'lib-proguard-rules.txt' 70 } 71 } 72 compileOptions { 73 sourceCompatibility JavaVersion.VERSION_1_8 74 targetCompatibility JavaVersion.VERSION_1_8 75 } 76 77 kotlinOptions { 78 jvmTarget = '1.8' 79 } 80 } 81 82 dependencies { 83 implementation "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin" 84 implementation "androidx.core:core-ktx:$versions.ktx" 85 implementation "androidx.appcompat:appcompat:$versions.appcompat" 86 } 87 } 88} 89 90task clean(type: Delete) { 91 delete rootProject.buildDir 92} 93