File tree Expand file tree Collapse file tree 6 files changed +10
-25
lines changed
gradle/mixed-java-kotlin-hello-world Expand file tree Collapse file tree 6 files changed +10
-25
lines changed Original file line number Diff line number Diff line change 11buildscript {
2+ ext. kotlin_version = ' 1.0.0-rc-1036'
23 repositories {
34 mavenCentral()
4- maven {
5- url ' http://oss.sonatype.org/content/repositories/snapshots'
6- }
75 }
86 dependencies {
9- classpath ' org.jetbrains.kotlin:kotlin-gradle-plugin:0.1-SNAPSHOT '
7+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$k otlin_version "
108 }
119}
1210
@@ -21,21 +19,16 @@ sourceSets {
2119
2220repositories {
2321 mavenCentral()
24- maven {
25- url ' http://oss.sonatype.org/content/repositories/snapshots'
26- }
2722}
2823
2924dependencies {
30- compile ' com.google.guava:guava:12.0'
31- compile ' org.jetbrains.kotlin:kotlin-stdlib:0.1-SNAPSHOT'
32- deployCompile ' com.google.guava:guava:12.0'
25+ compile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
3326 testCompile ' org.testng:testng:6.8'
34- testCompile ' org.jetbrains.kotlin:kotlin-test-junit:0.1-SNAPSHOT '
27+ testCompile " org.jetbrains.kotlin:kotlin-test-junit:$k otlin_version "
3528}
3629
3730test. testClassesDir = project. tasks. compileTestKotlin. destinationDir
3831
3932task wrapper (type : Wrapper ) {
40- gradleVersion= " 1.6 "
33+ gradleVersion= " 2.7 "
4134}
Original file line number Diff line number Diff line change 1- # Wed May 28 14:39:29 MSK 2014
1+ # Thu Feb 04 17:38:08 CET 2016
22distributionBase =GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6- distributionUrl =http \://services.gradle.org/distributions/gradle-1.6-all .zip
6+ distributionUrl =https \://services.gradle.org/distributions/gradle-2.7-bin .zip
Original file line number Diff line number Diff line change @@ -42,11 +42,6 @@ case "`uname`" in
4242 ;;
4343esac
4444
45- # For Cygwin, ensure paths are in UNIX format before anything is touched.
46- if $cygwin ; then
47- [ -n " $JAVA_HOME " ] && JAVA_HOME=` cygpath --unix " $JAVA_HOME " `
48- fi
49-
5045# Attempt to set APP_HOME
5146# Resolve links: $0 may be a link
5247PRG=" $0 "
114109if $cygwin ; then
115110 APP_HOME=` cygpath --path --mixed " $APP_HOME " `
116111 CLASSPATH=` cygpath --path --mixed " $CLASSPATH " `
112+ JAVACMD=` cygpath --unix " $JAVACMD " `
117113
118114 # We build the pattern for arguments to be converted via cygpath
119115 ROOTDIRSRAW=` find -L / -maxdepth 1 -mindepth 1 -type d 2> /dev/null`
Original file line number Diff line number Diff line change 11package demo
22
3- import com.google.common.base.Joiner
4- import java.util.ArrayList
3+ import java.util.*
54
65class KotlinGreetingJoiner (val greeter : Greeter ) {
76
@@ -12,7 +11,6 @@ class KotlinGreetingJoiner(val greeter: Greeter) {
1211 }
1312
1413 fun getJoinedGreeting (): String {
15- val joiner = Joiner .on(" and " ).skipNulls()
16- return " ${greeter.getGreeting()} ${joiner.join(names)} "
14+ return " ${greeter.getGreeting()} ${names.filterNotNull().joinToString(separator = " and " )} "
1715 }
1816}
Original file line number Diff line number Diff line change 11package demo
22
3- import com.google.common.primitives.Ints
4- import com.google.common.base.Joiner
53import kotlin.test.assertEquals
64import org.junit.Test as test
75
You can’t perform that action at this time.
0 commit comments