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:
+1
-1
@@ -287,7 +287,7 @@ targetList.each { target ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
task dist {
|
task dist {
|
||||||
dependsOn 'distCompiler', 'distRuntime', ':tools:gradle-plugin:dist'
|
dependsOn 'distCompiler', 'distRuntime', ':tools:kotlin-native-gradle-plugin:dist'
|
||||||
}
|
}
|
||||||
|
|
||||||
task crossDist {
|
task crossDist {
|
||||||
|
|||||||
@@ -8,17 +8,12 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
if (project.hasProperty("konan.plugin.path")) {
|
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:+"
|
||||||
classpath files(project.property("konan.plugin.path"))
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:+"
|
|
||||||
} else {
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:+"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildBash(type: Exec) {
|
task buildSh(type: Exec) {
|
||||||
commandLine "${projectDir.canonicalPath}/build.sh"
|
commandLine "${projectDir.canonicalPath}/build.sh"
|
||||||
workingDir projectDir.canonicalPath
|
workingDir projectDir.canonicalPath
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
konan.home=../../dist
|
konan.home=../../dist
|
||||||
konan.plugin.path=../../tools/gradle-plugin/dist/gradle-plugin.jar
|
|
||||||
+1
-1
@@ -25,4 +25,4 @@ include ':runtime'
|
|||||||
include ':common'
|
include ':common'
|
||||||
include ':backend.native:tests'
|
include ':backend.native:tests'
|
||||||
include ':tools:helpers'
|
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: 'maven-publish'
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
|
|
||||||
|
group = 'org.jetbrains.kotlin'
|
||||||
|
version = konanVersion
|
||||||
|
|
||||||
// TODO: move this code to top level (the same for backend.native)
|
// TODO: move this code to top level (the same for backend.native)
|
||||||
// Copied from backend.native
|
// Copied from backend.native
|
||||||
allprojects {
|
allprojects {
|
||||||
@@ -80,9 +83,6 @@ publishing {
|
|||||||
publications {
|
publications {
|
||||||
gradlePlugin(MavenPublication) {
|
gradlePlugin(MavenPublication) {
|
||||||
artifact jar
|
artifact jar
|
||||||
groupId 'org.jetbrains.kotlin'
|
|
||||||
artifactId 'kotlin-native-gradle-plugin'
|
|
||||||
version konanVersion
|
|
||||||
pom.withXml { XmlProvider xml ->
|
pom.withXml { XmlProvider xml ->
|
||||||
def stdlibDep = xml.asNode().appendNode("dependencies").appendNode("dependency")
|
def stdlibDep = xml.asNode().appendNode("dependencies").appendNode("dependency")
|
||||||
stdlibDep.appendNode("groupId", "org.jetbrains.kotlin")
|
stdlibDep.appendNode("groupId", "org.jetbrains.kotlin")
|
||||||
@@ -111,4 +111,4 @@ bintray {
|
|||||||
override = project.hasProperty("override")
|
override = project.hasProperty("override")
|
||||||
}
|
}
|
||||||
publications = ['gradlePlugin']
|
publications = ['gradlePlugin']
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user