Use rewriteDeps task on the projects with runtime dependency on embeddable compiler...
which are using shaded dependencies
This commit is contained in:
@@ -1,21 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* 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 org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
|
||||
description = "Kotlin Android Extensions Compiler"
|
||||
|
||||
@@ -33,39 +17,18 @@ dependencies {
|
||||
runtime(commonDep("com.google.android", "android"))
|
||||
}
|
||||
|
||||
//val originalSrc = "$projectDir/src"
|
||||
//val targetSrc = file("$buildDir/embeddable-target-src")
|
||||
//
|
||||
//if (System.getProperty("idea.active") == null) {
|
||||
//
|
||||
// val prepareEmbeddableSources by task<Copy> {
|
||||
// from(originalSrc)
|
||||
// into(targetSrc)
|
||||
// filter { it.replace(Regex("(?<!\\.)com\\.intellij"), "org.jetbrains.kotlin.com.intellij") }
|
||||
// }
|
||||
//
|
||||
// tasks.withType<KotlinCompile> { dependsOn(prepareEmbeddableSources) }
|
||||
// tasks.withType<JavaCompile> { dependsOn(prepareEmbeddableSources) }
|
||||
//}
|
||||
|
||||
|
||||
sourceSets {
|
||||
"main" {
|
||||
// if (System.getProperty("idea.active") == null) {
|
||||
// java.srcDir(targetSrc)
|
||||
// resources.srcDir("src").apply { include("META-INF/**", "**/*.properties") }
|
||||
// }
|
||||
// else {
|
||||
projectDefault()
|
||||
// }
|
||||
}
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
val jar: Jar by tasks
|
||||
jar.apply {
|
||||
from(getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs)
|
||||
}
|
||||
|
||||
runtimeJar(rewriteDepsToShadedCompiler(jar))
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user