Different extensions (and KonanTarget communalization). (#665)

This commit is contained in:
alexander-gorshenev
2017-06-19 12:45:57 +03:00
committed by Nikolay Igotti
parent c57ad51fc7
commit d3c24bb387
51 changed files with 419 additions and 245 deletions
+4 -10
View File
@@ -14,14 +14,8 @@
* limitations under the License.
*/
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile group: 'com.ullink.slack', name: 'simpleslackapi', version: '0.6.0'
allprojects {
repositories {
mavenCentral()
}
}
+34
View File
@@ -0,0 +1,34 @@
/*
* 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.
*/
apply plugin: 'groovy'
buildscript {
repositories {
mavenCentral()
}
}
dependencies {
compile gradleApi()
compile localGroovy()
compile group: 'com.ullink.slack', name: 'simpleslackapi', version: '0.6.0'
compile project(':shared')
}
rootProject.dependencies {
runtime project(path)
}
@@ -22,6 +22,7 @@ import org.gradle.api.tasks.JavaExec
import org.gradle.api.tasks.ParallelizableTask
import org.gradle.api.tasks.TaskAction
import org.gradle.process.ExecResult
import org.jetbrains.kotlin.konan.target.*
abstract class KonanTest extends JavaExec {
protected String source
@@ -208,7 +209,9 @@ fun handleExceptionContinuation(x: (Throwable) -> Unit): Continuation<Any?> = ob
void executeTest() {
createOutputDirectory()
def program = buildExePath()
def exe = "${program}.kexe"
def targetManager = new TargetManager(project.testTarget)
def suffix = targetManager.programSuffix
def exe = "$program$suffix"
compileTest(buildCompileList(), program)
+18
View File
@@ -0,0 +1,18 @@
/*
* 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.
*/
include 'shared'
include 'plugins'
+46
View File
@@ -0,0 +1,46 @@
/*
* 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.
*/
buildscript {
ext {
gradleProperties = new Properties()
gradleProperties.load(new FileInputStream("$projectDir/../../gradle.properties"))
kotlin_version = gradleProperties."kotlin_version"
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
compileKotlin {
// We reuse the source code from the Project in buildSrc.
source "$projectDir/../../shared"
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
rootProject.dependencies {
runtime project(path)
}