| /* |
| * Copyright 2020 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. |
| */ |
| |
| // This file contains logic used for compiling the individual themes of material-icons-extended |
| |
| import androidx.build.AndroidXComposePlugin |
| import androidx.build.LibraryGroups |
| import androidx.build.LibraryType |
| import androidx.build.Publish |
| import androidx.build.RunApiTasks |
| import androidx.compose.material.icons.generator.tasks.IconGenerationTask |
| |
| apply plugin: "AndroidXPlugin" |
| apply plugin: "com.android.library" |
| apply plugin: "AndroidXComposePlugin" |
| |
| apply from: "${buildscript.sourceFile.parentFile}/shared-dependencies.gradle" |
| |
| dependencies { |
| kotlinPlugin(project(":compose:compiler:compiler")) |
| } |
| |
| if (!AndroidXComposePlugin.isMultiplatformEnabled(project)) { |
| // We're not sure how to merge icons jars when multiplatform is enabled |
| IconGenerationTask.registerExtendedIconThemeProject( |
| project, |
| android, |
| AndroidXComposePlugin.isMultiplatformEnabled(project) |
| ) |
| } |
| |
| dependencies.attributesSchema { |
| attribute(iconExportAttr) |
| attribute(iconBuildTypeAttr) |
| } |
| |
| configurations { |
| def jarsDir = "${buildDir}/intermediates/aar_main_jar" |
| iconExportDebug { |
| attributes { |
| attribute(iconExportAttr, "true") |
| attribute(iconBuildTypeAttr, "debug") |
| } |
| outgoing.artifact(new File("${jarsDir}/debug/classes.jar")) { |
| builtBy("syncDebugLibJars") |
| } |
| } |
| iconExportRelease { |
| attributes { |
| attribute(iconExportAttr, "true") |
| attribute(iconBuildTypeAttr, "release") |
| } |
| outgoing.artifact(new File("${jarsDir}/release/classes.jar")) { |
| builtBy("syncReleaseLibJars") |
| } |
| } |
| } |
| |
| androidx { |
| name = "Compose Material Icons Extended" |
| type = LibraryType.PUBLISHED_LIBRARY |
| publish = Publish.NONE // actually embedded into the main aar rather than published separately |
| mavenGroup = LibraryGroups.Compose.MATERIAL |
| // This module has a large number (1000+) of generated source files and so doc generation / |
| // API tracking will simply take too long |
| runApiTasks = new RunApiTasks.No("A thousand generated source files") |
| inceptionYear = "2020" |
| description = "Compose Material Design extended icons. This module contains material icons of the corresponding theme. It is a very large dependency and should not be included directly." |
| } |