Gradle plugin: fix --include-build workflow

By convention, gradle uses project name as artifactId, `project.group`
property for groupId and `project.version` for version.

This commit switches to this convention instead of configuring
publication tasks directly. It allows to easily substitute published
plugin with a plugin build locally by issuing

`./gradlew build --include-build ../kotlin-native`

in the dependent project.
This commit is contained in:
Ilya Matveev
2017-05-25 11:20:32 +07:00
committed by ilmat192
parent 7997b4f362
commit 862c68b5c5
14 changed files with 9 additions and 15 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ targetList.each { target ->
}
task dist {
dependsOn 'distCompiler', 'distRuntime', ':tools:gradle-plugin:dist'
dependsOn 'distCompiler', 'distRuntime', ':tools:kotlin-native-gradle-plugin:dist'
}
task crossDist {
+2 -7
View File
@@ -8,17 +8,12 @@ subprojects {
}
dependencies {
if (project.hasProperty("konan.plugin.path")) {
classpath files(project.property("konan.plugin.path"))
classpath "org.jetbrains.kotlin:kotlin-stdlib:+"
} else {
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:+"
}
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:+"
}
}
}
task buildBash(type: Exec) {
task buildSh(type: Exec) {
commandLine "${projectDir.canonicalPath}/build.sh"
workingDir projectDir.canonicalPath
}
+1 -2
View File
@@ -1,2 +1 @@
konan.home=../../dist
konan.plugin.path=../../tools/gradle-plugin/dist/gradle-plugin.jar
konan.home=../../dist
+1 -1
View File
@@ -25,4 +25,4 @@ include ':runtime'
include ':common'
include ':backend.native:tests'
include ':tools:helpers'
include ':tools:gradle-plugin'
include ':tools:kotlin-native-gradle-plugin'
@@ -20,6 +20,9 @@ apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
group = 'org.jetbrains.kotlin'
version = konanVersion
// TODO: move this code to top level (the same for backend.native)
// Copied from backend.native
allprojects {
@@ -80,9 +83,6 @@ publishing {
publications {
gradlePlugin(MavenPublication) {
artifact jar
groupId 'org.jetbrains.kotlin'
artifactId 'kotlin-native-gradle-plugin'
version konanVersion
pom.withXml { XmlProvider xml ->
def stdlibDep = xml.asNode().appendNode("dependencies").appendNode("dependency")
stdlibDep.appendNode("groupId", "org.jetbrains.kotlin")
@@ -111,4 +111,4 @@ bintray {
override = project.hasProperty("override")
}
publications = ['gradlePlugin']
}
}