Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 2.0.0-rc-1, also updated all other dependencies, resolves ratpack/example-ratpack-gradle-java-app#7 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
buildscript {
repositories {
jcenter()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'io.ratpack:ratpack-gradle:1.0.0',
'com.github.jengelman.gradle.plugins:shadow:1.2.1'
classpath 'io.ratpack:ratpack-gradle:2.0.0-rc-1',
'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
}
}

Expand All @@ -18,15 +19,15 @@ apply plugin: "io.ratpack.ratpack-java"
apply plugin: "com.github.johnrengelman.shadow"

repositories {
jcenter()
mavenCentral()
}

dependencies {
testCompile 'junit:junit:4.11'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'

// This is a Guice ratpack app
compile ratpack.dependency("guice")
runtime 'org.slf4j:slf4j-simple:1.7.10'
implementation ratpack.dependency("guice")
runtimeOnly 'org.slf4j:slf4j-simple:1.7.36'
}

// The “ratpack” plugin is IDEA aware.
Expand All @@ -51,4 +52,8 @@ idea {
//some CI config
apply from: file("gradle/ci.gradle")

test {
useJUnitPlatform()
}

mainClassName = "ratpack.example.java.MyApp"
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sat Nov 09 15:05:56 GMT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4 changes: 2 additions & 2 deletions src/main/java/ratpack/example/java/LoggingHandler.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ratpack.example.java;

import ratpack.handling.Context;
import ratpack.handling.Handler;
import ratpack.core.handling.Context;
import ratpack.core.handling.Handler;

/**
* An example of a handler implicitly set up by a module
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/ratpack/example/java/MyApp.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package ratpack.example.java;

import ratpack.core.handling.Chain;
import ratpack.core.server.BaseDir;
import ratpack.core.server.RatpackServer;
import ratpack.guice.Guice;
import ratpack.handling.Chain;
import ratpack.server.BaseDir;
import ratpack.server.RatpackServer;

import java.util.Map;

public class MyApp {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ratpack/example/java/MyHandler.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ratpack.example.java;

import ratpack.handling.Context;
import ratpack.handling.Handler;
import ratpack.core.handling.Context;
import ratpack.core.handling.Handler;

import javax.inject.Inject;
import javax.inject.Singleton;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ratpack/example/java/MyModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.google.inject.AbstractModule;
import com.google.inject.multibindings.Multibinder;
import ratpack.handling.HandlerDecorator;
import ratpack.core.handling.HandlerDecorator;

/**
* An example Guice module.
Expand All @@ -11,7 +11,7 @@ public class MyModule extends AbstractModule {

/**
* Adds a service impl to the application, and registers a decorator so that all requests are logged.
* Registered implementations of {@link ratpack.handling.HandlerDecorator} are able to decorate the application handler.
* Registered implementations of {@link ratpack.core.handling.HandlerDecorator} are able to decorate the application handler.
*
* @see MyHandler
*/
Expand Down
11 changes: 4 additions & 7 deletions src/test/java/ratpack/example/java/SiteTest.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
package ratpack.example.java;

import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import ratpack.test.MainClassApplicationUnderTest;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

@RunWith(JUnit4.class)
public class SiteTest {

String lineSeparator = System.getProperty("line.separator");

MainClassApplicationUnderTest aut = new MainClassApplicationUnderTest(MyApp.class);

@After
@AfterEach
public void tearDown() {
aut.close();
}
Expand Down