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

Current generator update #23

Merged
merged 6 commits into from
Jun 27, 2024
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand Down Expand Up @@ -50,6 +52,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand All @@ -61,6 +65,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand All @@ -75,6 +81,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand Down
1 change: 1 addition & 0 deletions android/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ gradle/wrapper/gradle-wrapper.properties
gradlew
gradlew.bat
pom.xml
settings.gradle
src/main/AndroidManifest.xml
src/main/java/com/spoonacular/DefaultApi.java
src/main/java/com/spoonacular/IngredientsApi.java
Expand Down
94 changes: 32 additions & 62 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
group = 'com.spoonacular'
project.version = '1.1.2'

buildscript {
repositories {
mavenLocal()
google()
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

allprojects {
repositories {
google()
jcenter()
}
plugins {
id 'com.android.library' version '7.4.2'
id 'maven-publish'
}


apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
namespace "com.spoonacular.client"
compileSdkVersion 33
buildToolsVersion '34.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 33
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -41,58 +18,51 @@ android {
lintOptions {
abortOnError false
}

// Rename the aar correctly
libraryVariants.all { variant ->
variant.outputs.all { output ->
if (outputFile != null && outputFileName.endsWith('.aar')) {
outputFileName = "${archivesBaseName}-${version}.aar"
}
}
packagingOptions {
resources.excludes += "META-INF/DEPENDENCIES"
}

testOptions {
unitTests.returnDefaultValues = true
}
publishing {
singleVariant('release') {
withSourcesJar()
}
}
}

ext {
swagger_annotations_version = "1.6.6"
gson_version = "2.10.1"
httpcore_version = "4.4.16"
httpmime_version = "4.5.14"
volley_version = "1.2.1"
junit_version = "4.13.2"
robolectric_version = "4.5.1"
concurrent_unit_version = "0.4.6"
}

dependencies {
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
implementation "com.google.code.gson:gson:$gson_version"
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
implementation ("org.apache.httpcomponents:httpcore:$httpcore_version") {
exclude(group: "org.apache.httpcomponents", module: "httpclient")
}
implementation ("org.apache.httpcomponents:httpmime:$httpmime_version") {
exclude(group: "org.apache.httpcomponents", module: "httpclient")
}
implementation "com.android.volley:volley:${volley_version}"
testImplementation "junit:junit:$junit_version"
testImplementation "org.robolectric:robolectric:${robolectric_version}"
testImplementation "net.jodah:concurrentunit:${concurrent_unit_version}"
}

afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDirectory
task.destinationDirectory = project.file("${project.buildDir}/outputs/jar")
task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
publishing {
publications {
release(MavenPublication) {
groupId = 'com.spoonacular'
artifactId = 'android-client'
version = '1.1.2'

artifacts {
archives sourcesJar
afterEvaluate {
from components.release
}
}
}
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
17 changes: 17 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "android-client"
18 changes: 9 additions & 9 deletions angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"build": "ng-packagr -p ng-package.json"
},
"peerDependencies": {
"@angular/core": "^17.0.0",
"@angular/core": "^18.0.0",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@angular/common": "^17.0.0",
"@angular/compiler": "^17.0.0",
"@angular/compiler-cli": "^17.0.0",
"@angular/core": "^17.0.0",
"@angular/platform-browser": "^17.0.0",
"ng-packagr": "^17.0.3",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"ng-packagr": "^18.0.0",
"reflect-metadata": "^0.1.3",
"rxjs": "^7.4.0",
"typescript": ">=4.9.3 <5.3.0",
"zone.js": "^0.14.0"
"typescript": ">=5.4.0 <5.5.0",
"zone.js": "^0.14.7"
}}
4 changes: 2 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -F
# Setting environment variables
$env:PYTHON_POST_PROCESS_FILE = "yapf -i"
$VERSION = "1.1.2"
$GEN = "openapi-generator-cli-7.7.0-20240612.084912-80.jar"
$GEN = "openapi-generator-cli-7.7.0-SNAPSHOT.jar"
$SPEC = "spoonacular-openapi-3.json"

# Removing the 'python' directory
Expand Down Expand Up @@ -39,7 +39,7 @@ java -jar $GEN generate -i $SPEC -g cpp-qt-client --artifact-version $VERSION --
java -jar $GEN generate -i $SPEC -g csharp --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/tree/master/csharp/ --git-user-id=ddsky --artifact-id csharp-client -o csharp --additional-properties "hideGenerationTimestamp=true,packageGuid={F31A0234-3AB7-4F0C-B889-AECE893F4AC5}" --name-mappings _=Underscore
java -jar $GEN generate -i $SPEC -g dart --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/tree/master/dart/ --git-user-id=ddsky --artifact-id dart-client -o dart
java -jar $GEN generate -i $SPEC -g elixir --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/tree/master/elixir/ --git-user-id=ddsky --artifact-id elixir-client -o elixir
java -jar $GEN generate -i $SPEC -g erlang-client --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/tree/master/erlang/ --git-user-id=ddsky --artifact-id erlang-client -o erlang
java -jar $GEN generate -i $SPEC -g erlang-client --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/tree/master/erlang/ --git-user-id=ddsky --artifact-id erlang-client -o erlang --name-mappings _=Underscore
java -jar $GEN generate -i $SPEC -g go --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/go --git-user-id=ddsky --artifact-id go-client -o go --name-mappings _=Underscore
java -jar $GEN generate -i $SPEC -g php --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/tree/master/php/ --git-user-id=ddsky --artifact-id php-client -o php
java -jar $GEN generate -i $SPEC -g python --artifact-version $VERSION --additional-properties "packageVersion=${VERSION},project-name=spoonacular,packageName=spoonacular" --git-repo-id=spoonacular-api-clients/tree/master/python/ --git-user-id=ddsky --artifact-id python-client -o python --name-mappings _=underscore
Expand Down
Loading
Loading