Skip to content

Commit

Permalink
Merge pull request #95 from criteo/clean_gradle
Browse files Browse the repository at this point in the history
Clean gradle
  • Loading branch information
gturri authored Mar 27, 2024
2 parents c985a2f + f91152f commit 55cb152
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ ext {
description = 'Criteo API Clients Generator'
sourceCompatibility = '1.8'
jar.enabled = false
gereratedClientsDirName = 'generated-sources'
generatedClientsDirName = 'generated-sources'
swaggerSourceList = swaggerList
}
5 changes: 1 addition & 4 deletions generator/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {

apply plugin: 'org.openapi.generator'

def clientOutputDir = "$projectDir/../../$rootProject.gereratedClientsDirName/java".toString()
def clientOutputDir = "$rootDir/$rootProject.generatedClientsDirName/java"
def buildDir = "$projectDir/build";
def resourcesDir = "$projectDir/resources".toString()
def criteoPackage = project.properties["package.name.base"]
Expand All @@ -38,9 +38,6 @@ task generateClient(type: GradleBuild) {
def taskList = [];

rootProject.swaggerSourceList.each {
def jsonFile = file(it.path);
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text);

def parsedApiName = it.getName().replace(".json", "").toLowerCase();
def (criteoService, apiVersionFromName) = parsedApiName.tokenize('_');
def criteoApiVersion = apiVersionFromName.replace('-', '_');
Expand Down
5 changes: 1 addition & 4 deletions generator/php/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ext {
jar.enabled = false
}

def clientOutputDir = "$projectDir/../../$rootProject.gereratedClientsDirName/php".toString()
def clientOutputDir = "$rootDir/$rootProject.generatedClientsDirName/php"
def resourcesDir = "$projectDir/resources".toString()
def criteoPackage = project.properties["package.name.base"]
def generatorVersion = project.properties["generator.version"]
Expand All @@ -40,9 +40,6 @@ task generateClient(type: GradleBuild) {
def taskList = ['cleanPreviousDist'];

rootProject.swaggerSourceList.each {
def jsonFile = file(it.path);
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text);

def parsedApiName = it.getName().replace(".json", "").toLowerCase();
def (criteoService, apiVersionFromName) = parsedApiName.tokenize('_');
def criteoApiVersion = apiVersionFromName.replace('-', '_');
Expand Down
5 changes: 1 addition & 4 deletions generator/python/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ext {
jar.enabled = false
}

def clientOutputDir = "$projectDir/../../$rootProject.gereratedClientsDirName/python".toString()
def clientOutputDir = "$rootDir/$rootProject.generatedClientsDirName/python"
def resourcesDir = "$projectDir/resources".toString()
def buildDir = "$projectDir/build"
def criteoPackage = project.properties["package.name.base"]
Expand All @@ -42,9 +42,6 @@ task generateClient(type: GradleBuild) {
def taskList = ['cleanPreviousDist'];

rootProject.swaggerSourceList.each {
def jsonFile = file(it.path);
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text);

def parsedApiName = it.getName().replace(".json", "").toLowerCase();
def taskSuffix = language + "_" + parsedApiName
def (criteoService, apiVersionFromName) = parsedApiName.tokenize('_');
Expand Down

0 comments on commit 55cb152

Please sign in to comment.