aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-11-14 16:19:46 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-11-23 16:58:30 +0300
commitf94beaa25f07333ad47738d5d7fafdd3dd302b04 (patch)
treefc6bfc169c0bdc7bf44b2b36932d0d406260541e
parentac00e0375473a5de711f7866cb17ea5c82f4e7a5 (diff)
downloaddokka-f94beaa25f07333ad47738d5d7fafdd3dd302b04.tar.gz
dokka-f94beaa25f07333ad47738d5d7fafdd3dd302b04.tar.bz2
dokka-f94beaa25f07333ad47738d5d7fafdd3dd302b04.zip
Clarify Kotlin Versions and config in project
-rw-r--r--build.gradle4
-rw-r--r--core/build.gradle26
-rw-r--r--gradle.properties7
-rw-r--r--integration/build.gradle17
-rw-r--r--runners/android-gradle-plugin/build.gradle12
-rw-r--r--runners/ant/build.gradle11
-rw-r--r--runners/build.gradle12
-rw-r--r--runners/cli/build.gradle10
-rw-r--r--runners/fatjar/build.gradle2
-rw-r--r--runners/gradle-integration-tests/build.gradle16
-rw-r--r--runners/gradle-plugin/build.gradle13
-rw-r--r--runners/maven-plugin/build.gradle15
12 files changed, 98 insertions, 47 deletions
diff --git a/build.gradle b/build.gradle
index e64427b7..0002ee69 100644
--- a/build.gradle
+++ b/build.gradle
@@ -31,7 +31,7 @@ allprojects {
maven { url "http://dl.bintray.com/kotlin/kotlin-eap" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
maven { url 'https://jitpack.io' }
- maven { url "https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/$kotlin_compiler_version/maven" }
+ maven { url "https://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_dev_CompilerAllPlugins/$bundled_kotlin_compiler_version/maven" }
ivy(repo)
}
}
@@ -67,7 +67,7 @@ task wrapper(type: Wrapper) {
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
-def versions = DependenciesVersionGetter.getVersions(project, kotlin_compiler_version)
+def versions = DependenciesVersionGetter.getVersions(project, bundled_kotlin_compiler_version)
ext.ideaVersion = versions["idea.build.id"]
diff --git a/core/build.gradle b/core/build.gradle
index 68d3da89..a8f0f275 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -2,26 +2,34 @@ import javax.tools.ToolProvider
buildscript {
dependencies {
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_compiler_to_compile_core_version"
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
-sourceCompatibility = 1.6
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ languageVersion = "1.2"
+ apiVersion = languageVersion
+ jvmTarget = "1.8"
+ }
+}
dependencies {
- compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_compiler_version"
- compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_compiler_version"
+ compile "org.jetbrains.kotlin:kotlin-stdlib:$bundled_kotlin_compiler_version"
+ compile "org.jetbrains.kotlin:kotlin-reflect:$bundled_kotlin_compiler_version"
compile group: 'com.google.inject', name: 'guice', version: '3.0'
compile "org.jsoup:jsoup:1.8.3"
- compile "org.jetbrains.kotlin:kotlin-compiler:$kotlin_compiler_version"
- compile "org.jetbrains.kotlin:kotlin-script-runtime:$kotlin_compiler_version"
+ compile "org.jetbrains.kotlin:kotlin-compiler:$bundled_kotlin_compiler_version"
+ compile "org.jetbrains.kotlin:kotlin-script-runtime:$bundled_kotlin_compiler_version"
- compile "teamcity:kotlin-ide-common:$kotlin_compiler_version"
- compile "teamcity:markdown:$kotlin_compiler_version"
+ compile "teamcity:kotlin-ide-common:$bundled_kotlin_compiler_version"
+ compile "teamcity:markdown:$bundled_kotlin_compiler_version"
compile intellijCoreAnalysis()
@@ -33,7 +41,7 @@ dependencies {
compile project(":integration")
testCompile group: 'junit', name: 'junit', version: '4.12'
- testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_compiler_to_compile_core_version
+ testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_version
testCompile "com.nhaarman:mockito-kotlin-kt1.1:1.5.0"
testCompile ideaRT()
diff --git a/gradle.properties b/gradle.properties
index 154d7776..d109426b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,10 +2,9 @@ dokka_version=0.9.16
dokka_publication_channel=dokka
#Kotlin compiler and plugin
-kotlin_version=1.1.51
-kotlin_compiler_version=1.2.20-dev-175
-kotlin_compiler_to_compile_core_version=1.2.0-rc-39
-kotlin_for_gradle_version=1.0.7
+bundled_kotlin_compiler_version=1.2.20-dev-175
+kotlin_version=1.2.0-rc-39
+kotlin_for_gradle_runtime_version=1.0.7
#IntelliJ plugin to download openapi.jar
gradle_intellij_plugin_version=0.3.0-SNAPSHOT
diff --git a/integration/build.gradle b/integration/build.gradle
index 571ad0b3..32ca3454 100644
--- a/integration/build.gradle
+++ b/integration/build.gradle
@@ -1,14 +1,25 @@
buildscript {
dependencies {
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_for_gradle_version"
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
+
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ languageVersion = "1.2"
+ apiVersion = "1.0"
+ jvmTarget = "1.8"
+ }
+}
+
dependencies {
- compileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_for_gradle_version
- compileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_version
+ compileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_for_gradle_runtime_version
+ compileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_runtime_version
compile('com.github.yole:jkid:7d9c529c87') {
transitive = false
}
diff --git a/runners/android-gradle-plugin/build.gradle b/runners/android-gradle-plugin/build.gradle
index 193b8eee..5050fd87 100644
--- a/runners/android-gradle-plugin/build.gradle
+++ b/runners/android-gradle-plugin/build.gradle
@@ -3,13 +3,19 @@ import org.jetbrains.CorrectShadowPublishing
apply plugin: 'java'
apply plugin: 'kotlin'
-sourceCompatibility = 1.8
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "com.gradle.plugin-publish"
-tasks.withType(AbstractCompile) {
- classpath += configurations.shadow
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ freeCompilerArgs += "-Xjsr305=strict"
+ languageVersion = "1.2"
+ apiVersion = "1.0"
+ jvmTarget = "1.8"
+ }
}
repositories {
diff --git a/runners/ant/build.gradle b/runners/ant/build.gradle
index 85328d95..e7dcd441 100644
--- a/runners/ant/build.gradle
+++ b/runners/ant/build.gradle
@@ -1,6 +1,15 @@
apply plugin: 'kotlin'
-sourceCompatibility = 1.6
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ freeCompilerArgs += "-Xjsr305=strict"
+ languageVersion = "1.2"
+ apiVersion = languageVersion
+ jvmTarget = "1.8"
+ }
+}
dependencies {
compile project(":core")
diff --git a/runners/build.gradle b/runners/build.gradle
index f1d2873c..23d232d2 100644
--- a/runners/build.gradle
+++ b/runners/build.gradle
@@ -1,15 +1,7 @@
-configure([project("ant"), project("cli"), project("fatjar"), project("maven-plugin")]) {
+subprojects {
buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
-}
-
-configure([project("gradle-plugin"), project("android-gradle-plugin"), project("gradle-integration-tests")]) {
- buildscript {
- dependencies {
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_for_gradle_version"
- }
- }
-}
+} \ No newline at end of file
diff --git a/runners/cli/build.gradle b/runners/cli/build.gradle
index 13b0c941..7f733140 100644
--- a/runners/cli/build.gradle
+++ b/runners/cli/build.gradle
@@ -1,6 +1,14 @@
apply plugin: 'kotlin'
-sourceCompatibility = 1.6
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ languageVersion = "1.2"
+ apiVersion = languageVersion
+ jvmTarget = "1.8"
+ }
+}
dependencies {
compile project(":core")
diff --git a/runners/fatjar/build.gradle b/runners/fatjar/build.gradle
index fc9abeda..4ce0416c 100644
--- a/runners/fatjar/build.gradle
+++ b/runners/fatjar/build.gradle
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
import org.jetbrains.PluginXmlTransformer
-apply plugin: 'kotlin'
+apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
dependencies {
diff --git a/runners/gradle-integration-tests/build.gradle b/runners/gradle-integration-tests/build.gradle
index f807c12b..1809589f 100644
--- a/runners/gradle-integration-tests/build.gradle
+++ b/runners/gradle-integration-tests/build.gradle
@@ -2,6 +2,16 @@
apply plugin: 'kotlin'
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ freeCompilerArgs += "-Xjsr305=strict"
+ languageVersion = "1.2"
+ apiVersion = "1.0"
+ jvmTarget = "1.8"
+ }
+}
configurations {
dokkaPlugin
@@ -11,9 +21,9 @@ configurations {
dependencies {
- testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: kotlin_for_gradle_version
- testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_version
- testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test', version: kotlin_for_gradle_version
+ testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: kotlin_for_gradle_runtime_version
+ testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_runtime_version
+ testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test', version: kotlin_for_gradle_runtime_version
testCompile ideaRT()
dokkaPlugin project(path: ':runners:gradle-plugin', configuration: 'shadow')
diff --git a/runners/gradle-plugin/build.gradle b/runners/gradle-plugin/build.gradle
index 21603a26..790f3132 100644
--- a/runners/gradle-plugin/build.gradle
+++ b/runners/gradle-plugin/build.gradle
@@ -1,23 +1,26 @@
apply plugin: 'java'
apply plugin: 'kotlin'
-sourceCompatibility = 1.8
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "com.gradle.plugin-publish"
+sourceCompatibility = 1.8
-compileKotlin {
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
- freeCompilerArgs += "-Xjsr305-annotations=strict"
+ freeCompilerArgs += "-Xjsr305=strict"
+ languageVersion = "1.2"
+ apiVersion = "1.0"
+ jvmTarget = "1.8"
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
- shadow group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: kotlin_for_gradle_version
- shadow group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_version
+ shadow group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_for_gradle_runtime_version
+ shadow group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_runtime_version
compile project(":integration")
diff --git a/runners/maven-plugin/build.gradle b/runners/maven-plugin/build.gradle
index a9a77a8b..0e8d6a4d 100644
--- a/runners/maven-plugin/build.gradle
+++ b/runners/maven-plugin/build.gradle
@@ -1,17 +1,22 @@
import groovy.io.FileType
import org.jetbrains.CrossPlatformExec
-import shadow.org.apache.commons.io.FileUtils
-import java.nio.file.FileVisitResult
import java.nio.file.Files
-import java.nio.file.Paths
import java.nio.file.StandardCopyOption
-import java.nio.file.attribute.BasicFileAttributes
-
apply plugin: 'kotlin'
apply plugin: 'com.github.johnrengelman.shadow'
+sourceCompatibility = 1.8
+
+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
+ kotlinOptions {
+ freeCompilerArgs += "-Xjsr305=strict"
+ languageVersion = "1.2"
+ apiVersion = languageVersion
+ jvmTarget = "1.8"
+ }
+}
dependencies {
shadow project(":runners:fatjar")