Skip to content

Switch json libraries to jitpack #12531

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

Merged
merged 6 commits into from
May 4, 2022
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ dependencies {
implementation project(':airbyte-protocol:models')
implementation project(':airbyte-integrations:connectors:destination-s3')
implementation project(':airbyte-integrations:connectors:destination-gcs')
implementation('tech.allegro.schema.json2avro:converter') {
version {
branch = 'master'
}
}
implementation group: 'com.github.airbytehq', name: 'json-avro-converter', version: '1.0.1'

integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-destination-test')
integrationTestJavaImplementation files(project(':airbyte-integrations:bases:base-normalization').airbyteDocker.outputs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ dependencies {
implementation group: 'org.apache.hadoop', name: 'hadoop-aws', version: '3.3.0'
implementation group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-core', version: '3.3.0'
implementation group: 'org.apache.parquet', name: 'parquet-avro', version: '1.12.0'
implementation('tech.allegro.schema.json2avro:converter') {
version {
branch = 'master'
}
}
implementation group: 'com.github.airbytehq', name: 'json-avro-converter', version: '1.0.1'

integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-destination-test')
integrationTestJavaImplementation project(':airbyte-integrations:connectors:destination-databricks')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ dependencies {
implementation group: 'org.apache.hadoop', name: 'hadoop-aws', version: '3.3.0'
implementation group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-core', version: '3.3.0'
implementation group: 'org.apache.parquet', name: 'parquet-avro', version: '1.12.0'
implementation('tech.allegro.schema.json2avro:converter') {
version {
branch = 'master'
}
}
implementation group: 'com.github.airbytehq', name: 'json-avro-converter', version: '1.0.1'

testImplementation 'org.apache.commons:commons-lang3:3.11'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ dependencies {
implementation group: 'org.apache.hadoop', name: 'hadoop-aws', version: '3.3.0'
implementation group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-core', version: '3.3.0'
implementation group: 'org.apache.parquet', name: 'parquet-avro', version: '1.12.0'
implementation('tech.allegro.schema.json2avro:converter') {
version {
branch = 'master'
}
}
implementation group: 'com.github.airbytehq', name: 'json-avro-converter', version: '1.0.1'

testImplementation 'org.apache.commons:commons-lang3:3.11'
testImplementation "org.mockito:mockito-inline:4.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@ dependencies {
integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-source-test')
integrationTestJavaImplementation project(':airbyte-integrations:connectors:source-e2e-test-cloud')
}

allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
12 changes: 1 addition & 11 deletions airbyte-integrations/connectors/source-e2e-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ dependencies {
// https://github.com/airbytehq/jsongenerator
implementation 'net.jimblackler.jsonschemafriend:core:0.11.2'
implementation 'org.mozilla:rhino-engine:1.7.14'
implementation('net.jimblackler:jsongenerator') {
version {
branch = 'master'
}
}
implementation group: 'com.github.airbytehq', name: 'jsongenerator', version: '1.0.0-pre'

testImplementation project(":airbyte-json-validation")
testImplementation project(':airbyte-test-utils')
Expand All @@ -33,9 +29,3 @@ dependencies {
integrationTestJavaImplementation project(':airbyte-integrations:connectors:source-e2e-test')
integrationTestJavaImplementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
}

allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
public final class ContinuousFeedConstants {

public static final int MOCK_JSON_MAX_TREE_SIZE = 100;
public static final Configuration MOCK_JSON_CONFIG = new DefaultConfig();
public static final Configuration MOCK_JSON_CONFIG = DefaultConfig.build()
.setPedanticTypes(true)
.setGenerateNulls(false)
.setGenerateMinimal(false)
.setGenerateAdditionalProperties(false)
.setUseRomanCharsOnly(true)
.setNonRequiredPropertyChance(1.0f)
.get();

private ContinuousFeedConstants() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class GeneratorTest {

private static final JsonSchemaValidator JSON_VALIDATOR = new JsonSchemaValidator();
private static final Configuration CONFIG = new DefaultConfig();
private static final Configuration CONFIG = ContinuousFeedConstants.MOCK_JSON_CONFIG;
private static final ThreadLocalRandom RANDOM = ThreadLocalRandom.current();

public static class GeneratorSchemaProvider implements ArgumentsProvider {
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ subprojects {
// TODO(Issue-4915): Remove this when upstream is merged in.
url 'https://airbyte.mycloudrepo.io/public/repositories/airbyte-public-jars/'
}
maven {
url 'https://jitpack.io'
}
}

pmd {
Expand Down
9 changes: 0 additions & 9 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ gradleEnterprise {
}
}

sourceControl {
gitRepository("https://github.com/airbytehq/json-avro-converter.git") {
producesModule("tech.allegro.schema.json2avro:converter")
}
gitRepository("https://github.com/airbytehq/jsongenerator.git") {
producesModule("net.jimblackler:jsongenerator")
}
}

rootProject.name = 'airbyte'

// SUB_BUILD is an enum of <blank>, PLATFORM, CONNECTORS_BASE, ALL_CONNECTORS and OCTAVIA_CLI. Blank is equivalent to all.
Expand Down