Skip to content

Commit

Permalink
Merge pull request #32 from agorapulse/chore/run-script-in-blocking
Browse files Browse the repository at this point in the history
blocking execution of the console script
  • Loading branch information
musketyr authored Dec 3, 2024
2 parents 8d82cd3 + 522ad66 commit e1790c5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
* limitations under the License.
*/
plugins {
id("org.jetbrains.kotlin.jvm") version "1.9.21"
id("org.jetbrains.kotlin.plugin.allopen") version "1.9.21"
id("com.google.devtools.ksp") version "1.9.21-1.0.15"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.minimal.application") version "4.2.0"
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.kotlin.plugin.allopen")
id("io.micronaut.minimal.application")
}

config {
Expand Down Expand Up @@ -48,7 +46,6 @@ repositories {
dependencies {
implementation project(':micronaut-console')

ksp("io.micronaut:micronaut-http-validation")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
slug=agorapulse/micronaut-console
group=com.agorapulse
version=4.0.0-SNAPSHOT
kordampPluginVersion=0.51.0
kordampPluginVersion=0.53.0
gitPublishPluginVersion=2.1.3
nexusPluginVersion=1.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@
import io.micronaut.http.annotation.PathVariable;
import io.micronaut.http.annotation.Post;
import io.micronaut.http.annotation.Produces;
import io.micronaut.scheduling.TaskExecutors;
import io.micronaut.scheduling.annotation.ExecuteOn;

import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

@ExecuteOn(TaskExecutors.BLOCKING)
@Controller("${console.path:/console}")
public class ConsoleController {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import io.netty.util.concurrent.FastThreadLocalThread

if (Thread.currentThread() instanceof FastThreadLocalThread) {
throw new IllegalStateException('Running on FastThreadLocalThread will fail execution of HTTP client requests')
}

println "This is a debug message"

"Hello Developer!"
33 changes: 14 additions & 19 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
plugins {
id 'org.kordamp.gradle.settings' version kordampPluginVersion
id 'org.kordamp.gradle.groovy-project' version kordampPluginVersion
id 'org.kordamp.gradle.checkstyle' version kordampPluginVersion
id 'org.kordamp.gradle.codenarc' version kordampPluginVersion
id 'org.kordamp.gradle.guide' version kordampPluginVersion
id 'org.kordamp.gradle.coveralls' version kordampPluginVersion
id 'org.ajoberstar.git-publish' version gitPublishPluginVersion
id 'io.github.gradle-nexus.publish-plugin' version nexusPluginVersion
}
}

buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath group: 'org.kordamp.gradle', name: 'settings-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'groovy-project-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'checkstyle-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'codenarc-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'guide-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'coveralls-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.ajoberstar', name: 'gradle-git-publish', version: gitPublishPluginVersion
classpath group: 'io.github.gradle-nexus', name: 'publish-plugin', version: nexusPluginVersion
classpath group: 'io.micronaut.gradle', name: 'micronaut-minimal-plugin', version: micronautGradlePluginVersion
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: kotlinVersion
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-allopen', version: kotlinVersion

classpath 'org.apache.httpcomponents:httpclient:4.5.5'
}
}

plugins {
id 'org.kordamp.gradle.settings'
id 'org.kordamp.gradle.settings' version "$kordampPluginVersion"
id 'com.gradle.enterprise' version '3.15.1'
}

Expand Down

0 comments on commit e1790c5

Please sign in to comment.