-
Notifications
You must be signed in to change notification settings - Fork 21
chore(cts): update dependency on cts generation for java #505
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
package com.algolia.codegen.cts.manager; | ||
|
||
import com.algolia.codegen.Utils; | ||
import java.util.*; | ||
import org.openapitools.codegen.SupportingFile; | ||
|
||
public class JavaCtsManager extends CtsManager { | ||
|
||
public void addSupportingFiles(List<SupportingFile> supportingFiles) {} | ||
public void addSupportingFiles(List<SupportingFile> supportingFiles) { | ||
supportingFiles.add( | ||
new SupportingFile("build.mustache", ".", "build.gradle") | ||
); | ||
} | ||
|
||
protected void addExtraToBundle(Map<String, Object> bundle) { | ||
bundle.put( | ||
"packageVersion", | ||
Utils | ||
.readJsonFile("config/clients.config.json") | ||
.get("java") | ||
.get("packageVersion") | ||
.asText() | ||
); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testImplementation 'com.algolia:algoliasearch-client-java:{{packageVersion}}-SNAPSHOT' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you know if semver works with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I don't remember what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's like experimental, it will be released on a different central repository that user have to opt in if they want to use the SNAPSHOT, so once this is out of beta the SNAPSHOT will be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but it's fine it this stays here it works well like this, it's just a small improvement if possible There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. semver works with |
||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2' | ||
testImplementation 'org.skyscreamer:jsonassert:1.5.0' | ||
testImplementation 'com.google.code.gson:gson:2.8.9' | ||
} | ||
|
||
group = 'com.algolia' | ||
version = '1.0' | ||
description = 'java-tests' | ||
java.sourceCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
test() { | ||
useJUnitPlatform() | ||
testLogging { | ||
events "passed", "skipped", "failed" | ||
showStandardStreams = true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so clean 💙