changed lots of stuff

main
Arne Wischer 4 years ago
parent 63b2611696
commit 62846f7144
  1. 4
      aoclient_v1.yml
  2. 73
      api/build.gradle
  3. 44
      gen/build.gradle
  4. BIN
      gradle/wrapper/gradle-wrapper.jar
  5. 2
      gradle/wrapper/gradle-wrapper.properties
  6. 6
      gradlew
  7. 14
      gradlew.bat
  8. 4
      settings.gradle

@ -1,7 +1,7 @@
openapi: '3.0.2' openapi: '3.0.2'
info: info:
title: AoC API title: AoC API
version: '1.0' version: '1.1'
servers: servers:
- url: https://aoc.home.tarilaus.net/v1 - url: https://aoc.home.tarilaus.net/v1
@ -9,6 +9,8 @@ servers:
paths: paths:
/solve/{year}/{day}: /solve/{year}/{day}:
get: get:
tags:
- "Solve"
operationId: solvePuzzle operationId: solvePuzzle
summary: Solve puzzle summary: Solve puzzle
description: Solves the puzzle for a given day and year description: Solves the puzzle for a given day and year

@ -0,0 +1,73 @@
plugins {
id "org.openapi.generator" version "6.2.0"
}
group = 'de.fettlaus'
version = '0.1.0'
apply plugin: 'base'
apply plugin: 'maven-publish'
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
sourceSets {
main.java.srcDirs = ["$buildDir/generated/src/main/java"]
}
openApiGenerate {
generatorName = "java"
inputSpec = "$rootDir/aoclient_v1.yml".toString()
outputDir = "$buildDir/generated".toString()
apiPackage = "de.fettlaus.aoclient.api"
invokerPackage = "de.fettlaus.aoclient.invoker"
modelPackage = "de.fettlaus.aoclient.model"
groupId = "de.fettlaus"
id = "aoclient"
version = "0.0.1"
configOptions = [
dateLibrary: "java8"
]
}
compileJava.dependsOn tasks.openApiGenerate
dependencies {
implementation 'io.swagger:swagger-annotations:1.6.5'
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'io.gsonfire:gson-fire:1.8.5'
implementation 'javax.ws.rs:jsr311-api:1.1.1'
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
implementation 'org.openapitools:jackson-databind-nullable:0.2.3'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation "jakarta.annotation:jakarta.annotation-api:1.3.5"
}
publishing {
repositories {
maven {
url = 'https://git.fettlaus.de/api/packages/fettlaus/maven'
name = 'gitea'
authentication {
header(HttpHeaderAuthentication)
}
credentials(HttpHeaderCredentials)
}
}
publications {
maven(MavenPublication) {
artifactId = 'aoclient'
from components.java
}
}
}

@ -1,44 +0,0 @@
plugins {
id "org.openapi.generator" version "6.2.0"
}
apply plugin:'base'
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
openApiGenerate {
generatorName = "java"
inputSpec = "$rootDir/aoclient_v1.yml".toString()
outputDir = "$buildDir/generated".toString()
apiPackage = "de.fettlaus.aoclient.api"
invokerPackage = "de.fettlaus.aoclient.invoker"
modelPackage = "de.fettlaus.aoclient.model"
groupId = "de.fettlaus"
id = "aoclient"
version = "0.0.1"
configOptions = [
dateLibrary: "java8"
]
}
project(":api") {
dependencies {
project(":gen")
}
publishing {
repositories {
maven {
url = 'https://git.fettlaus.de/api/packages/fettlaus/maven'
name = 'gitea'
authentication {
header(HttpHeaderAuthentication)
}
credentials(HttpHeaderCredentials)
}
}
}
}

Binary file not shown.

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-milestone-2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

6
gradlew vendored

@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \ org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args. # Use "xargs" to parse quoted args.
# #
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. # With -n1 it outputs one arg per line, with the quotes and backslashes removed.

14
gradlew.bat vendored

@ -14,7 +14,7 @@
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

@ -1,4 +1,4 @@
rootProject.name = 'AoClientGen' rootProject.name = 'AoClientGen'
include 'gen'
include 'api' include 'api'
project(':api').projectDir = new File(settingsDir, 'build/generated') project(":api").name = "aoclient"
Loading…
Cancel
Save