[go: nahoru, domu]

blob: 5ff293c93993d76ef74774393991c0bd6faae168 [file] [log] [blame]
/*
* Copyright 2019 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.
*/
import androidx.build.LibraryGroups
import androidx.build.LibraryType
import androidx.build.LibraryVersions
buildscript {
dependencies {
classpath 'org.anarres.jarjar:jarjar-gradle:1.0.1'
}
}
plugins {
id("java")
id("AndroidXPlugin")
}
apply plugin: 'org.anarres.jarjar'
dependencies {
compileOnly(project(":compose:compiler:compiler-hosted"))
}
jarjar.repackage('embeddedPlugin') {
destinationName "compiler.jar"
from configurations.compileClasspath
classRename 'com.intellij.**', 'org.jetbrains.kotlin.com.intellij.@1'
}
configurations {
// replace the standard jar with the one built by 'jarjar.repackage' in both api and runtime variants
apiElements.outgoing.artifacts.clear()
apiElements.outgoing.artifact(embeddedPlugin.destinationPath) {
builtBy embeddedPlugin
}
runtimeElements.outgoing.artifacts.clear()
runtimeElements.outgoing.artifact(embeddedPlugin.destinationPath) {
builtBy embeddedPlugin
}
}
androidx {
name = "Compose Compiler"
type = LibraryType.COMPILER_PLUGIN
mavenVersion = LibraryVersions.COMPOSE
mavenGroup = LibraryGroups.Compose.COMPILER
inceptionYear = "2019"
description = "Compiler plugin that enables Compose"
}