So, I started toy projects in intellij by creating...
# getting-started
n
So, I started toy projects in intellij by creating the regular kotlin application. That was fine, but there was no gradle file that I could find so when I wanted to add dependencies to play around with (arrow), I couldn't figure out how to do it. So then I started a new project, and I picked a gradle project (with the build.gradle.kts file) Now, I can see where to add dependencies, but I can't actually build and run main When I try, I get "Error: Could not find or load main class MainKt". Do I need to add targets to the gradle file? I have sourceSets already...
Copy code
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.4.0"
    kotlin("kapt") version "1.4.0"
}

group = "FooBarBaz"
version = "1.0-SNAPSHOT"


repositories {
    mavenCentral()
    jcenter()
    maven ("<https://dl.bintray.com/arrow-kt/arrow-kt/>" )
}

val arrow_version = "0.10.5"

dependencies {
    implementation(kotlin("stdlib-jdk8"))
    implementation(kotlin("io.arrow-kt:arrow-optics:$arrow_version"))
    implementation(kotlin("io.arrow-kt:arrow-syntax:$arrow_version"))
    implementation(kotlin("io.arrow-kt:arrow-optics:$arrow_version"))
    //kapt("io.arrow-kt:arrow-meta:$arrow_version")
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
}
sourceSets.main {
    java.srcDirs("src/java", "src/kotlin")
}
My dir structure is
src/main/kotlin/main.kt