Skip to content
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
4 changes: 4 additions & 0 deletions GL51TD1-master/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM adoptopenjdk/openjdk13-openj9:jdk-13.0.2_8_openj9-0.18.0-alpine-slim
COPY build/libs/p2020-*-all.jar p2020.jar
EXPOSE 8080
CMD ["java", "-Dcom.sun.management.jmxremote", "-Xmx128m", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", "-jar", "p2020.jar"]
59 changes: 59 additions & 0 deletions GL51TD1-master/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
plugins {
id "groovy"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "application"
}



version "0.1"
group "gl51"

repositories {
mavenCentral()
maven { url "https://jcenter.bintray.com" }
}

configurations {
// for dependencies that are needed for development only
developmentOnly
}

dependencies {
annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
compileOnly platform("io.micronaut:micronaut-bom:$micronautVersion")
compileOnly "io.micronaut:micronaut-inject-groovy"
implementation platform("io.micronaut:micronaut-bom:$micronautVersion")
implementation "io.micronaut:micronaut-runtime-groovy"
implementation "io.micronaut:micronaut-validation"
implementation "io.micronaut:micronaut-http-server-netty"
implementation "io.micronaut:micronaut-http-client"
runtimeOnly "ch.qos.logback:logback-classic:1.2.3"
testCompileOnly platform("io.micronaut:micronaut-bom:$micronautVersion")
testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion")
testImplementation("org.spockframework:spock-core") {
exclude group: "org.codehaus.groovy", module: "groovy-all"
}
testImplementation "io.micronaut:micronaut-inject-groovy"
testImplementation "io.micronaut.test:micronaut-test-spock"
testImplementation "io.micronaut.test:micronaut-test-junit5"
}

test.classpath += configurations.developmentOnly

mainClassName = "gl51.Application"

tasks.withType(GroovyCompile) {
groovyOptions.forkOptions.jvmArgs.add('-Dgroovy.parameters=true')
}


shadowJar {
mergeServiceFiles()
}

tasks.withType(JavaExec) {
classpath += configurations.developmentOnly
jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
}

1 change: 1 addition & 0 deletions GL51TD1-master/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
micronautVersion=1.3.3
Binary file added GL51TD1-master/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions GL51TD1-master/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
172 changes: 172 additions & 0 deletions GL51TD1-master/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions GL51TD1-master/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions GL51TD1-master/micronaut-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
profile: service
defaultPackage: gl51
---
testFramework: spock
sourceLanguage: groovy
1 change: 1 addition & 0 deletions GL51TD1-master/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name="p2020"
11 changes: 11 additions & 0 deletions GL51TD1-master/src/main/groovy/gl51/Application.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package gl51

import io.micronaut.runtime.Micronaut
import groovy.transform.CompileStatic

@CompileStatic
class Application {
static void main(String[] args) {
Micronaut.run(Application)
}
}
11 changes: 11 additions & 0 deletions GL51TD1-master/src/main/groovy/gl51/data/Photo.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package gl51.data

/**
* Class representing a picture
*/
class Photo {
int id
int width
int height
String path
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package gl51.service

import gl51.data.Photo

/**
* Ceci permet de mettre à jour la base de données
*/
interface DatabaseUpdateService {

/**
* Met à jour la base de données
* @return
*/
void updateDatabase(int id)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package gl51.service

import gl51.data.Photo

/**
* Ceci permet d'appliquer un logo en filigrane
*/
interface LogoApplyService {

/**
* Applique le logo sur une image
* @return
*/
Photo applyLogo(int id)
}
Loading