Skip to content

Commit

Permalink
Merge pull request #272 from ThisaruGuruge/update-9
Browse files Browse the repository at this point in the history
Update the dependency versions to latest timestamps
  • Loading branch information
ThisaruGuruge authored Apr 10, 2024
2 parents 83fdbab + 75e9942 commit fc24206
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 60 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
plugins {
id 'java-library'
id 'jacoco'
id "com.github.johnrengelman.shadow" version "${githubJohnrengelmanShadowVersion}"
id "de.undercouch.download" version "${underCouchDownloadVersion}"
id "net.researchgate.release" version "${researchgateReleaseVersion}"
id "com.github.johnrengelman.shadow"
id "de.undercouch.download"
id "net.researchgate.release"
}

def packageName = "graphql"
Expand Down
38 changes: 19 additions & 19 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
org.gradle.caching=true
group=io.ballerina
version=0.10.0-SNAPSHOT
org.gradle.jvmargs=-Xmx4096M

#dependency
ballerinaLangVersion=2201.9.0-20240321-130200-5b03581e
puppycrawlCheckstyleVersion=10.12.1
githubJohnrengelmanShadowVersion=8.1.1
underCouchDownloadVersion=5.4.0
researchgateReleaseVersion=2.8.0
ballerinaLangVersion=2201.9.0-20240405-165800-4b163f78
checkstylePluginVersion=10.12.1
shadowJarPluginVersion=8.1.1
downloadPluginVersion=5.4.0
releasePluginVersion=2.8.0
testngVersion=7.6.1
slf4jVersion=1.7.30
commonsLang3Version=3.9
commonsLoggingVersion=1.2
commonsIoVersion=2.11.0
graphqlJavaVersion=17.2
graphqlJavaVersion=21.5
snakeYamlVersion=2.0
orgJsonVersion=20231013
picocliVersion=4.7.4
org.gradle.jvmargs=-Xmx4096M

# Standard Library Dependencies
# Level 01
Expand All @@ -26,32 +26,32 @@ stdlibTimeVersion=2.4.0
stdlibUrlVersion=2.4.0

# Level 02
stdlibConstraintVersion=1.4.0
stdlibCryptoVersion=2.5.0
stdlibConstraintVersion=1.5.0
stdlibCryptoVersion=2.7.0-20240410-115200-2ae9fd5
stdlibLogVersion=2.9.0
stdlibOsVersion=1.8.0
stdlibTaskVersion=2.5.0

# Level 03
stdlibCacheVersion=3.7.0
stdlibCacheVersion=3.8.0-20240409-101100-e2d7f4e
stdlibFileVersion=1.9.0
stdlibMimeVersion=2.9.0
stdlibUuidVersion=1.7.0
stdlibUuidVersion=1.8.0-20240410-125400-bbe7ac5

# Level 04
stdlibAuthVersion=2.10.0
stdlibJwtVersion=2.10.0
stdlibOAuth2Version=2.10.0
stdlibAuthVersion=2.11.0-20240410-121600-c514b62
stdlibJwtVersion=2.11.0-20240410-124800-1a4eb44
stdlibOAuth2Version=2.11.0-20240410-121700-502990d

# Level 05
stdlibHttpVersion=2.10.4
stdlibHttpVersion=2.11.0-20240410-121300-ae1095d

# Level 06
stdlibWebsocketVersion=2.10.1
stdlibWebsocketVersion=2.11.0-20240409-202400-9d7e032

# Level 07
stdlibGraphqlVersion=1.11.0
stdlibGraphqlVersion=1.12.0-20240410-115600-7fa8ba3

# Ballerinax Observer
observeVersion=1.2.0
observeInternalVersion=1.2.1
observeVersion=1.2.3-20240408-194900-a0e331f
observeInternalVersion=1.2.2-20240408-195500-1436319
6 changes: 2 additions & 4 deletions graphql-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ configurations {

dependencies {
checkstyle project(':checkstyle')
checkstyle "com.puppycrawl.tools:checkstyle:${project.puppycrawlCheckstyleVersion}"
checkstyle "com.puppycrawl.tools:checkstyle:${project.checkstylePluginVersion}"

implementation project(':graphql-schema-file-generator')
implementation project(':graphql-code-generator')
Expand All @@ -50,9 +50,7 @@ dependencies {
implementation "commons-logging:commons-logging:${commonsLoggingVersion}"
implementation "org.yaml:snakeyaml:${snakeYamlVersion}"
implementation "com.graphql-java:graphql-java:${graphqlJavaVersion}"
implementation "org.json:json:${orgJsonVersion}"
dist "com.graphql-java:graphql-java:${graphqlJavaVersion}"
dist "org.json:json:${orgJsonVersion}"
dist "io.ballerina.stdlib:graphql-commons:${stdlibGraphqlVersion}"

balTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") {
Expand All @@ -66,7 +64,7 @@ tasks.withType(Checkstyle) {
}

checkstyle {
toolVersion "${project.puppycrawlCheckstyleVersion}"
toolVersion "${project.checkstylePluginVersion}"
configFile rootProject.file("config/checkstyle/build/checkstyle.xml")
configProperties = ["suppressionFile" : file("${rootDir}/config/checkstyle/build/suppressions.xml")]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import java.io.IOException;
import java.util.List;
import java.util.Locale;

/**
* This class is used to validate the GraphQL query files.
Expand Down Expand Up @@ -78,7 +79,8 @@ private void validateDocument(GraphQLSchema graphQLSchema, String document, Stri
Document parsedDocument = Utils.getGraphQLQueryDocument(document);

Validator validator = new Validator();
List<ValidationError> validationErrors = validator.validateDocument(graphQLSchema, parsedDocument);
List<ValidationError> validationErrors = validator.validateDocument(graphQLSchema, parsedDocument,
Locale.getDefault());
if (validationErrors.size() > 0) {
throw new QueryValidationException("Graph query validation failed.", validationErrors, projectName);
}
Expand Down
1 change: 0 additions & 1 deletion graphql-cli/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
requires org.yaml.snakeyaml;
requires io.ballerina.cli;
requires info.picocli;
requires org.json;
requires java.net.http;
requires io.ballerina.parser;
requires com.graphqljava;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,23 @@ public Object[][] dataProviderForInitFunctionBody() {
@DataProvider(name = "dataProviderForRemoteFunctionBody")
public Object[][] dataProviderForRemoteFunctionBody() {
return new Object[][]{
{"graphql.config.yaml", "{stringquery=string`query country($code:ID!) {country(code:$code) " +
{"graphql.config.yaml", "{stringquery=string`query country($code:ID!){country(code:$code)" +
"{capital name}}`;map<anydata>variables={\"code\":code};" +
"jsongraphqlResponse=checkself.graphqlClient->executeWithType(query,variables);" +
"return<CountryResponse> check performDataBinding(graphqlResponse, CountryResponse);}"},
{"graphql-config-with-auth-apikeys-config.yaml", "{stringquery=string`query country($code:ID!) " +
"{country(code:$code) {capital name}}`;map<anydata>variables={\"code\":code};" +
{"graphql-config-with-auth-apikeys-config.yaml", "{stringquery=string`query country($code:ID!)" +
"{country(code:$code){capital name}}`;map<anydata>variables={\"code\":code};" +
"map<any>headerValues={\"Header1\":self.apiKeysConfig.header1,\"Header2\":" +
"self.apiKeysConfig.header2};map<string|string[]>httpHeaders=getMapForHeaders(headerValues);" +
"jsongraphqlResponse=checkself.graphqlClient->executeWithType(query,variables," +
"headers=httpHeaders);" +
"return<CountryResponse> check performDataBinding(graphqlResponse, CountryResponse);}"},
{"graphql-config-with-auth-client-config.yaml", "{stringquery=string`query country($code:ID!) " +
"{country(code:$code) {capital name}}`;map<anydata>variables={\"code\":code};" +
{"graphql-config-with-auth-client-config.yaml", "{stringquery=string`query country($code:ID!)" +
"{country(code:$code){capital name}}`;map<anydata>variables={\"code\":code};" +
"jsongraphqlResponse=checkself.graphqlClient->executeWithType(query,variables);" +
"return<CountryResponse> check performDataBinding(graphqlResponse, CountryResponse);}"},
{"graphql-config-with-auth-apikeys-and-client-config.yaml", "{stringquery=string`query " +
"country($code:ID!) {country(code:$code) {capital name}}`;" +
"country($code:ID!){country(code:$code){capital name}}`;" +
"map<anydata>variables={\"code\":code};map<any>headerValues={\"Header1\":" +
"self.apiKeysConfig.header1,\"Header2\":self.apiKeysConfig.header2};" +
"map<string|string[]>httpHeaders=getMapForHeaders(headerValues);" +
Expand All @@ -279,9 +279,9 @@ public Object[][] dataProviderForRemoteFunctionBodyWithRequiredParameters() {
{"graphql-config-to-test-arguments.yaml", "{stringquery=string`query operation1($argument1:Boolean!," +
"$argument2:String!,$argument3:Int!,$argument4:Float!,$argument5:ID!," +
"$argument6:CustomScalar!,$argument7:CustomInput!,$argument8:[CustomInput]!," +
"$argument9:[CustomInput!]!) {operation1(argument1:$argument1,argument2:$argument2," +
"$argument9:[CustomInput!]!){operation1(argument1:$argument1,argument2:$argument2," +
"argument3:$argument3,argument4:$argument4,argument5:$argument5,argument6:$argument6," +
"argument7:$argument7,argument8:$argument8,argument9:$argument9) {field1 field2}}`;" +
"argument7:$argument7,argument8:$argument8,argument9:$argument9){field1 field2}}`;" +
"map<anydata>variables={\"argument9\":argument9,\"argument5\":argument5," +
"\"argument6\":argument6,\"argument7\":argument7,\"argument8\":argument8," +
"\"argument1\":argument1,\"argument2\":argument2,\"argument3\":argument3," +
Expand All @@ -295,8 +295,8 @@ public Object[][] dataProviderForRemoteFunctionBodyWithRequiredParameters() {
public Object[][] dataProviderForRemoteFunctionBodyWithOptionalParameters() {
return new Object[][]{
{"graphql-config-to-test-arguments.yaml", "{stringquery=string`query operation2(" +
"$argument1:CustomInput,$argument2:[CustomInput],$argument3:[CustomInput!]) " +
"{operation2(argument1:$argument1,argument2:$argument2,argument3:$argument3) " +
"$argument1:CustomInput,$argument2:[CustomInput],$argument3:[CustomInput!])" +
"{operation2(argument1:$argument1,argument2:$argument2,argument3:$argument3)" +
"{field1 field2}}`;map<anydata>variables={\"argument1\":argument1," +
"\"argument2\":argument2,\"argument3\":argument3};jsongraphqlResponse=" +
"checkself.graphqlClient->executeWithType(query,variables);" +
Expand All @@ -308,8 +308,8 @@ public Object[][] dataProviderForRemoteFunctionBodyWithOptionalParameters() {
public Object[][] dataProviderForRemoteFunctionBodyWithRequiredAndOptionalParameters() {
return new Object[][]{
{"graphql-config-to-test-arguments.yaml", "{stringquery=string`query operation3(" +
"$argument1:CustomInput!,$argument2:CustomInput) {operation3(argument1:$argument1," +
"argument2:$argument2) {field1 field2}}`;map<anydata>variables={\"argument1\":argument1," +
"$argument1:CustomInput!,$argument2:CustomInput){operation3(argument1:$argument1," +
"argument2:$argument2){field1 field2}}`;map<anydata>variables={\"argument1\":argument1," +
"\"argument2\":argument2};jsongraphqlResponse=checkself.graphqlClient->" +
"executeWithType(query,variables);return<Operation3Response> " +
"check performDataBinding(graphqlResponse, Operation3Response);}"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ public void testGetQueryString()
String generatedQueryString = queryOperation1Definition.getQueryString();
String expectedQueryString = "query operation1($argument1:Boolean!,$argument2:String!,$argument3:Int!," +
"$argument4:Float!,$argument5:ID!,$argument6:CustomScalar!,$argument7:CustomInput!," +
"$argument8:[CustomInput]!,$argument9:[CustomInput!]!) {operation1(argument1:$argument1," +
"$argument8:[CustomInput]!,$argument9:[CustomInput!]!){operation1(argument1:$argument1," +
"argument2:$argument2,argument3:$argument3,argument4:$argument4,argument5:$argument5," +
"argument6:$argument6,argument7:$argument7,argument8:$argument8,argument9:$argument9) {field1 field2}}";
"argument6:$argument6,argument7:$argument7,argument8:$argument8,argument9:$argument9){field1 field2}}";
Assert.assertEquals(generatedQueryString, expectedQueryString);
}
}
16 changes: 9 additions & 7 deletions graphql-code-generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*
*/

apply plugin: "com.github.johnrengelman.shadow"
plugins {
id "com.github.johnrengelman.shadow"
}

configurations {
balTools
Expand All @@ -26,7 +28,7 @@ configurations {

dependencies {
checkstyle project(':checkstyle')
checkstyle "com.puppycrawl.tools:checkstyle:${project.puppycrawlCheckstyleVersion}"
checkstyle "com.puppycrawl.tools:checkstyle:${project.checkstylePluginVersion}"

implementation "org.ballerinalang:ballerina-lang:${ballerinaLangVersion}"
implementation "org.ballerinalang:ballerina-parser:${ballerinaLangVersion}"
Expand All @@ -35,11 +37,11 @@ dependencies {
implementation "org.ballerinalang:formatter-core:${ballerinaLangVersion}"
implementation "io.ballerina.stdlib:graphql-commons:${stdlibGraphqlVersion}"
implementation "commons-io:commons-io:${commonsIoVersion}"
implementation "org.json:json:${orgJsonVersion}" // NEW
implementation "com.graphql-java:graphql-java:${graphqlJavaVersion}" // NEW
implementation "commons-logging:commons-logging:${commonsLoggingVersion}" // NEW
implementation "org.json:json:${orgJsonVersion}"
implementation "com.graphql-java:graphql-java:${graphqlJavaVersion}"
implementation "commons-logging:commons-logging:${commonsLoggingVersion}"
testImplementation "org.testng:testng:${testngVersion}"
dist "com.graphql-java:graphql-java:${graphqlJavaVersion}" // NEW
dist "com.graphql-java:graphql-java:${graphqlJavaVersion}"

balTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") {
transitive = false
Expand All @@ -52,7 +54,7 @@ tasks.withType(Checkstyle) {
}

checkstyle {
toolVersion "${project.puppycrawlCheckstyleVersion}"
toolVersion "${project.checkstylePluginVersion}"
configFile rootProject.file("config/checkstyle/build/checkstyle.xml")
configProperties = ["suppressionFile" : file("${rootDir}/config/checkstyle/build/suppressions.xml")]
}
Expand Down
4 changes: 2 additions & 2 deletions graphql-schema-file-generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ configurations {

dependencies {
checkstyle project(':checkstyle')
checkstyle "com.puppycrawl.tools:checkstyle:${project.puppycrawlCheckstyleVersion}"
checkstyle "com.puppycrawl.tools:checkstyle:${project.checkstylePluginVersion}"

implementation "org.ballerinalang:ballerina-lang:${ballerinaLangVersion}"
implementation "org.ballerinalang:ballerina-parser:${ballerinaLangVersion}"
Expand All @@ -48,7 +48,7 @@ tasks.withType(Checkstyle) {
}

checkstyle {
toolVersion "${project.puppycrawlCheckstyleVersion}"
toolVersion "${project.checkstylePluginVersion}"
configFile rootProject.file("config/checkstyle/build/checkstyle.xml")
configProperties = ["suppressionFile" : file("${rootDir}/config/checkstyle/build/suppressions.xml")]
}
Expand Down
19 changes: 10 additions & 9 deletions graphql-tool-idl-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
*
*/

apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "jacoco"
plugins {
id "com.github.johnrengelman.shadow"
id "jacoco"
}

configurations {
balTools
Expand All @@ -36,13 +38,12 @@ dependencies {
testImplementation "org.testng:testng:${testngVersion}"
testImplementation "org.apache.commons:commons-lang3:${commonsLang3Version}"
implementation "commons-io:commons-io:${commonsIoVersion}"
implementation "commons-logging:commons-logging:${commonsLoggingVersion}" // NEW
implementation "org.yaml:snakeyaml:${snakeYamlVersion}" // NEW
implementation "com.graphql-java:graphql-java:${graphqlJavaVersion}" // NEW
implementation "org.json:json:${orgJsonVersion}" // NEW
dist "com.graphql-java:graphql-java:${graphqlJavaVersion}" // NEW
dist "com.google.guava:guava:${googleGuavaVersion}" // NEW
dist "org.json:json:${orgJsonVersion}" // NEW
implementation "commons-logging:commons-logging:${commonsLoggingVersion}"
implementation "org.yaml:snakeyaml:${snakeYamlVersion}"
implementation "com.graphql-java:graphql-java:${graphqlJavaVersion}"
implementation "org.json:json:${orgJsonVersion}"
implementation "com.graphql-java:graphql-java:${graphqlJavaVersion}"
implementation "org.json:json:${orgJsonVersion}"

balTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") {
transitive = false
Expand Down
26 changes: 26 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/*
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

pluginManagement {
plugins {
id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}"
id "de.undercouch.download" version "${downloadPluginVersion}"
id "net.researchgate.release" version "${releasePluginVersion}"
}
}

plugins {
id "com.gradle.enterprise" version "3.13.2"
}
Expand Down

0 comments on commit fc24206

Please sign in to comment.