gradle-plugin: Upload to bintray maven repository
This commit is contained in:
@@ -23,6 +23,7 @@ kotstd/kotstd.iml
|
|||||||
*.kt.exe
|
*.kt.exe
|
||||||
*.log
|
*.log
|
||||||
test.output
|
test.output
|
||||||
|
*.kexe
|
||||||
|
|
||||||
# Ignore Gradle GUI config
|
# Ignore Gradle GUI config
|
||||||
gradle-app.setting
|
gradle-app.setting
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.1.1'
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath files('../gradle-plugin.jar')
|
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +26,6 @@ konanArtifacts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
build {
|
build {
|
||||||
doLast {
|
doLast {
|
||||||
copy {
|
copy {
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.1.1'
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath files('../gradle-plugin.jar')
|
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ konanInterop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
konanArtifacts {
|
konanArtifacts {
|
||||||
gitchurn {
|
GitChurn {
|
||||||
inputFiles project.fileTree('src')
|
inputFiles project.fileTree('src')
|
||||||
useInterop 'libgit2'
|
useInterop 'libgit2'
|
||||||
linkerOpts "-L/opt/local/lib -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -lgit2"
|
linkerOpts "-L/opt/local/lib -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -lgit2"
|
||||||
@@ -32,7 +33,7 @@ konanArtifacts {
|
|||||||
build {
|
build {
|
||||||
doLast {
|
doLast {
|
||||||
copy {
|
copy {
|
||||||
from compileKonanGitchurn.artifactPath
|
from compileKonanGitChurn.artifactPath
|
||||||
into projectDir.canonicalPath
|
into projectDir.canonicalPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -1,12 +1,13 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.1.1'
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath files('../gradle-plugin.jar')
|
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ apply plugin: 'konan'
|
|||||||
konanInterop {
|
konanInterop {
|
||||||
libcurl {
|
libcurl {
|
||||||
defFile 'libcurl.def'
|
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 {
|
buildscript {
|
||||||
ext.kotlin_version = '1.1.1'
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath files('../gradle-plugin.jar')
|
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ konanInterop {
|
|||||||
|
|
||||||
|
|
||||||
konanArtifacts {
|
konanArtifacts {
|
||||||
openGlTeapot {
|
OpenGlTeapot {
|
||||||
inputFiles project.file("OpenGlTeapot.kt")
|
inputFiles project.file("OpenGlTeapot.kt")
|
||||||
useInterop 'opengl'
|
useInterop 'opengl'
|
||||||
def osName = System.getProperty("os.name")
|
def osName = System.getProperty("os.name")
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.1.1'
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath files('../gradle-plugin.jar')
|
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ konanInterop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
konanArtifacts {
|
konanArtifacts {
|
||||||
echoServer {
|
EchoServer {
|
||||||
inputFiles project.file("EchoServer.kt")
|
inputFiles project.file("EchoServer.kt")
|
||||||
useInterop "sockets"
|
useInterop "sockets"
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-13
@@ -1,12 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Use `./gradlew build<target platform>` to build the project.
|
||||||
|
* e.g. ./gradlew buildMacbook
|
||||||
|
*/
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.1.1'
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath files('../gradle-plugin.jar')
|
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.1"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +47,7 @@ konanInterop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
konanArtifacts {
|
konanArtifacts {
|
||||||
tetrisMacbook {
|
TetrisMacbook {
|
||||||
inputFiles project.file('Tetris.kt')
|
inputFiles project.file('Tetris.kt')
|
||||||
useInterop 'sdlMacbook'
|
useInterop 'sdlMacbook'
|
||||||
//linkerOpts "-F /Library/Frameworks -framework SDL2 -L/opt/local/lib -lSDL2"
|
//linkerOpts "-F /Library/Frameworks -framework SDL2 -L/opt/local/lib -lSDL2"
|
||||||
@@ -49,7 +55,7 @@ konanArtifacts {
|
|||||||
target 'macbook'
|
target 'macbook'
|
||||||
}
|
}
|
||||||
|
|
||||||
tetrisLinux {
|
TetrisLinux {
|
||||||
inputFiles project.file('Tetris.kt')
|
inputFiles project.file('Tetris.kt')
|
||||||
useInterop 'sdlLinux'
|
useInterop 'sdlLinux'
|
||||||
|
|
||||||
@@ -57,7 +63,7 @@ konanArtifacts {
|
|||||||
target 'linux'
|
target 'linux'
|
||||||
}
|
}
|
||||||
|
|
||||||
tetrisIphone {
|
TetrisIphone {
|
||||||
|
|
||||||
inputFiles project.file('Tetris.kt')
|
inputFiles project.file('Tetris.kt')
|
||||||
useInterop 'sdlIphone'
|
useInterop 'sdlIphone'
|
||||||
@@ -69,7 +75,7 @@ konanArtifacts {
|
|||||||
target 'iphone'
|
target 'iphone'
|
||||||
}
|
}
|
||||||
|
|
||||||
tetrisRaspberry {
|
TetrisRaspberry {
|
||||||
inputFiles project.file('Tetris.kt')
|
inputFiles project.file('Tetris.kt')
|
||||||
useInterop 'sdlRaspberry'
|
useInterop 'sdlRaspberry'
|
||||||
|
|
||||||
@@ -79,11 +85,10 @@ konanArtifacts {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.matching { it.name.startsWith("compileKonan") }.forEach { task ->
|
tasks.matching { it.name.startsWith("compileKonan") }.asList().forEach { compileTask ->
|
||||||
task.doLast {
|
task ("build${compileTask.name - "compileKonanTetris"}", type: Copy) {
|
||||||
copy {
|
dependsOn(compileTask)
|
||||||
from task.artifactPath
|
from compileTask.artifactPath
|
||||||
into projectDir.canonicalPath
|
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 {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
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: 'java'
|
||||||
apply plugin: "kotlin"
|
apply plugin: 'kotlin'
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'com.jfrog.bintray'
|
||||||
|
|
||||||
// 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
|
||||||
@@ -55,20 +64,40 @@ jar {
|
|||||||
from (rootProject.findProject(':tools:helpers').sourceSets.main.output)
|
from (rootProject.findProject(':tools:helpers').sourceSets.main.output)
|
||||||
}
|
}
|
||||||
|
|
||||||
task dist(type: Copy) {
|
publishing {
|
||||||
dependsOn(jar)
|
publications {
|
||||||
destinationDir project.file('dist')
|
gradlePlugin(MavenPublication) {
|
||||||
from jar.outputs.files
|
artifact jar
|
||||||
}
|
groupId 'org.jetbrains.kotlin'
|
||||||
|
artifactId 'kotlin-native-gradle-plugin'
|
||||||
task copy_to_samples(type: Copy) {
|
version '0.1'
|
||||||
dependsOn(dist)
|
pom.withXml { XmlProvider xml ->
|
||||||
destinationDir rootProject.file('samples')
|
def stdlibDep = xml.asNode().appendNode("dependencies").appendNode("dependency")
|
||||||
from dist.outputs.files
|
stdlibDep.appendNode("groupId", "org.jetbrains.kotlin")
|
||||||
}
|
stdlibDep.appendNode("artifactId", "kotlin-stdlib")
|
||||||
|
stdlibDep.appendNode("version", "$kotlin_version")
|
||||||
clean {
|
}
|
||||||
doFirst {
|
}
|
||||||
delete project.file('dist')
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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