plugins {
	id 'java'
	id 'application'
}

group = 'org.thoughtframe'
version = '0.0.1'
repositories {
	maven {
		url = uri("https://central.sonatype.com/repository/maven-snapshots/")
		mavenContent {
			snapshotsOnly()
		}
	}
}


dependencies {
	implementation project(':core')
	implementation project(':dam')
	implementation project(':thoughtframe')
	implementation 'javax.servlet:javax.servlet-api:4.0.1'



	implementation 'info.picocli:picocli:4.7.7'
	implementation 'info.picocli:picocli-shell-jline3:4.7.7'

	implementation 'org.jline:jline:3.30.6'

	implementation 'com.squareup.okhttp3:okhttp:4.12.0'


	implementation(platform("dev.tamboui:tamboui-bom:0.5.0-SNAPSHOT"))
	// For Toolkit DSL (recommended)
	implementation("dev.tamboui:tamboui-toolkit")

	// JLine backend (required)
	implementation("dev.tamboui:tamboui-jline3-backend")
	implementation("dev.tamboui:tamboui-image")
}

java {
	toolchain {
		languageVersion = JavaLanguageVersion.of(25)
	}
}

application {
	applicationName = 'tf'
	mainClass = 'org.thoughtframe.cli.Main'
}

tasks.withType(JavaCompile).configureEach {
	options.encoding = 'UTF-8'
}

tasks.named('run') {
	// Forward stdin to the shell so commands can be piped in, for smoke tests and
	// scripting. Without this the JVM sees an empty stdin and the read loop exits
	// immediately on EOF.
	standardInput = System.in
}
