Ishan Khare
02/25/2018, 11:32 AMbuildscript {
ext.kotlin_version = '1.2.21'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-stdlib"
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.21"
}
sourceSets {
main.kotlin.srcDirs += "./"
}
I'm getting errors related to kotlin-stdlib like
e: /home/ishan/code/kotlin-server/server/HttpRequest.kt: (8, 19): Unresolved reference: HashMap
e: /home/ishan/code/kotlin-server/server/HttpRequest.kt: (16, 38): Unresolved reference: split
e: /home/ishan/code/kotlin-server/server/HttpResponse.kt: (22, 31): Unresolved reference: toByteArray
e: /home/ishan/code/kotlin-server/server/HttpStatusCodes.kt: (3, 22): Unresolved reference: HashMap
e: /home/ishan/code/kotlin-server/server/HttpStatusCodes.kt: (3, 45): Unresolved reference: hashMapOfAndreas Sinz
02/25/2018, 11:49 AMAndreas Sinz
02/25/2018, 11:52 AMkotlin-stdlib out of the buildscript-scopeIshan Khare
02/25/2018, 11:54 AMIshan Khare
02/25/2018, 11:58 AMFAILURE: Build failed with an exception.
* Where:
Build file '/home/ishan/code/kotlin-server/server/build.gradle' line: 19
* What went wrong:
A problem occurred evaluating root project 'server'.
> Could not find method classpath() for arguments [org.jetbrains.kotlin:kotlin-stdlib] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.Andreas Sinz
02/25/2018, 12:00 PMclasspath to compile, because you require the stdlib to be present during compilationIshan Khare
02/25/2018, 12:01 PMbuildscript {
ext.kotlin_version = '1.2.21'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.21"
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-stdlib"
}
sourceSets {
main.kotlin.srcDirs += "./"
}Andreas Sinz
02/25/2018, 12:01 PMIshan Khare
02/25/2018, 12:03 PMIshan Khare
02/25/2018, 12:03 PMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
> Cannot resolve external dependency org.jetbrains.kotlin:kotlin-stdlib:1.2.21 because no repositories are defined.
Required by:
project :Andreas Sinz
02/25/2018, 12:04 PMrepositories outside of buildscript tooAndreas Sinz
02/25/2018, 12:04 PMkotlin-stdlib from maven-centralAndreas Sinz
02/25/2018, 12:04 PMrepositoriesIshan Khare
02/25/2018, 12:05 PMIshan Khare
02/25/2018, 12:06 PMIshan Khare
02/25/2018, 12:06 PMIshan Khare
02/25/2018, 12:07 PMmain function?Andreas Sinz
02/25/2018, 12:12 PMIshan Khare
02/25/2018, 12:18 PMAndreas Sinz
02/25/2018, 12:21 PMIshan Khare
02/25/2018, 12:24 PMAndreas Sinz
02/25/2018, 12:28 PMIshan Khare
02/25/2018, 1:22 PMAndreas Sinz
02/26/2018, 7:55 AM