gradle-plugin: Upload to bintray maven repository
This commit is contained in:
@@ -23,6 +23,7 @@ kotstd/kotstd.iml
|
||||
*.kt.exe
|
||||
*.log
|
||||
test.output
|
||||
*.kexe
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.1.1'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath files('../gradle-plugin.jar')
|
||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +26,6 @@ konanArtifacts {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
build {
|
||||
doLast {
|
||||
copy {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.1.1'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath files('../gradle-plugin.jar')
|
||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +22,7 @@ konanInterop {
|
||||
}
|
||||
|
||||
konanArtifacts {
|
||||
gitchurn {
|
||||
GitChurn {
|
||||
inputFiles project.fileTree('src')
|
||||
useInterop 'libgit2'
|
||||
linkerOpts "-L/opt/local/lib -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -lgit2"
|
||||
@@ -32,7 +33,7 @@ konanArtifacts {
|
||||
build {
|
||||
doLast {
|
||||
copy {
|
||||
from compileKonanGitchurn.artifactPath
|
||||
from compileKonanGitChurn.artifactPath
|
||||
into projectDir.canonicalPath
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,12 +1,13 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.1.1'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath files('../gradle-plugin.jar')
|
||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +16,7 @@ apply plugin: 'konan'
|
||||
konanInterop {
|
||||
libcurl {
|
||||
defFile 'libcurl.def'
|
||||
includeDirs '/usr/include', '/opt/local/include', '/usr/local/opt/curl/include'
|
||||
includeDirs '/usr/include', '/opt/local/include', '/usr/local/opt/curl/include', '.'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.1.1'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath files('../gradle-plugin.jar')
|
||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +21,7 @@ konanInterop {
|
||||
|
||||
|
||||
konanArtifacts {
|
||||
openGlTeapot {
|
||||
OpenGlTeapot {
|
||||
inputFiles project.file("OpenGlTeapot.kt")
|
||||
useInterop 'opengl'
|
||||
def osName = System.getProperty("os.name")
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.1.1'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath files('../gradle-plugin.jar')
|
||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +20,7 @@ konanInterop {
|
||||
}
|
||||
|
||||
konanArtifacts {
|
||||
echoServer {
|
||||
EchoServer {
|
||||
inputFiles project.file("EchoServer.kt")
|
||||
useInterop "sockets"
|
||||
}
|
||||
|
||||
+18
-13
@@ -1,12 +1,18 @@
|
||||
/**
|
||||
* Use `./gradlew build<target platform>` to build the project.
|
||||
* e.g. ./gradlew buildMacbook
|
||||
*/
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.1.1'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath files('../gradle-plugin.jar')
|
||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +47,7 @@ konanInterop {
|
||||
}
|
||||
|
||||
konanArtifacts {
|
||||
tetrisMacbook {
|
||||
TetrisMacbook {
|
||||
inputFiles project.file('Tetris.kt')
|
||||
useInterop 'sdlMacbook'
|
||||
//linkerOpts "-F /Library/Frameworks -framework SDL2 -L/opt/local/lib -lSDL2"
|
||||
@@ -49,7 +55,7 @@ konanArtifacts {
|
||||
target 'macbook'
|
||||
}
|
||||
|
||||
tetrisLinux {
|
||||
TetrisLinux {
|
||||
inputFiles project.file('Tetris.kt')
|
||||
useInterop 'sdlLinux'
|
||||
|
||||
@@ -57,7 +63,7 @@ konanArtifacts {
|
||||
target 'linux'
|
||||
}
|
||||
|
||||
tetrisIphone {
|
||||
TetrisIphone {
|
||||
|
||||
inputFiles project.file('Tetris.kt')
|
||||
useInterop 'sdlIphone'
|
||||
@@ -69,7 +75,7 @@ konanArtifacts {
|
||||
target 'iphone'
|
||||
}
|
||||
|
||||
tetrisRaspberry {
|
||||
TetrisRaspberry {
|
||||
inputFiles project.file('Tetris.kt')
|
||||
useInterop 'sdlRaspberry'
|
||||
|
||||
@@ -79,11 +85,10 @@ konanArtifacts {
|
||||
|
||||
}
|
||||
|
||||
tasks.matching { it.name.startsWith("compileKonan") }.forEach { task ->
|
||||
task.doLast {
|
||||
copy {
|
||||
from task.artifactPath
|
||||
into projectDir.canonicalPath
|
||||
}
|
||||
tasks.matching { it.name.startsWith("compileKonan") }.asList().forEach { compileTask ->
|
||||
task ("build${compileTask.name - "compileKonanTetris"}", type: Copy) {
|
||||
dependsOn(compileTask)
|
||||
from compileTask.artifactPath
|
||||
destinationDir projectDir
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,24 @@
|
||||
/**
|
||||
* One may use bintrayUser/bintrayKey project properties or BINTRAY_USER/BINTRAY_KEY environment variables to upload
|
||||
* built plugin to bintray repository.
|
||||
*/
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
// TODO: move this code to top level (the same for backend.native)
|
||||
// Copied from backend.native
|
||||
@@ -55,20 +64,40 @@ jar {
|
||||
from (rootProject.findProject(':tools:helpers').sourceSets.main.output)
|
||||
}
|
||||
|
||||
task dist(type: Copy) {
|
||||
dependsOn(jar)
|
||||
destinationDir project.file('dist')
|
||||
from jar.outputs.files
|
||||
}
|
||||
|
||||
task copy_to_samples(type: Copy) {
|
||||
dependsOn(dist)
|
||||
destinationDir rootProject.file('samples')
|
||||
from dist.outputs.files
|
||||
}
|
||||
|
||||
clean {
|
||||
doFirst {
|
||||
delete project.file('dist')
|
||||
publishing {
|
||||
publications {
|
||||
gradlePlugin(MavenPublication) {
|
||||
artifact jar
|
||||
groupId 'org.jetbrains.kotlin'
|
||||
artifactId 'kotlin-native-gradle-plugin'
|
||||
version '0.1'
|
||||
pom.withXml { XmlProvider xml ->
|
||||
def stdlibDep = xml.asNode().appendNode("dependencies").appendNode("dependency")
|
||||
stdlibDep.appendNode("groupId", "org.jetbrains.kotlin")
|
||||
stdlibDep.appendNode("artifactId", "kotlin-stdlib")
|
||||
stdlibDep.appendNode("version", "$kotlin_version")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bintray {
|
||||
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
|
||||
key = project.hasProperty('bintrayKey') ? project.property('bintrayKey') : System.getenv('BINTRAY_KEY')
|
||||
pkg {
|
||||
repo = 'kotlin-native-dependencies'
|
||||
name = 'kotlin-native-gradle-plugin'
|
||||
userOrg = 'jetbrains'
|
||||
// TODO: Specify license and github path
|
||||
//licenses = ['Apache-2.0']
|
||||
//vcsUrl = 'https://github.com/...'
|
||||
version {
|
||||
name = '0.1'
|
||||
desc = 'Kotlin Native Gradle plugin 0.1'
|
||||
}
|
||||
publish = true
|
||||
override = true
|
||||
}
|
||||
publications = ['gradlePlugin']
|
||||
}
|
||||
Reference in New Issue
Block a user