From 1ff0fc05177d7d7ed367ba81157d85f71134a8d9 Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Thu, 10 Oct 2024 15:43:52 -0400 Subject: [PATCH 1/6] add static analysis gradle plugins (spotless + palantir, errorprone + nullaway) --- README.md | 14 +++++++++++++ build.gradle.kts | 41 +++++++++++++++++++++++++++++++++++++++ copyright.txt | 16 +++++++++++++++ gradle/libs.versions.toml | 13 +++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 copyright.txt diff --git a/README.md b/README.md index ad4272e..ba03da7 100644 --- a/README.md +++ b/README.md @@ -1 +1,15 @@ A MongoDB Dialect for the Hibernate ORM + +## Build + +[Gradle](https://gradle.org/) is the building tool with [Kotlin](https://kotlinlang.org/) DSL as default. + +Starting with Gradle 8.2, creating new builds using gradle init defaults to generating Gradle builds using Kotlin DSL. + +See https://blog.gradle.org/kotlin-dsl-is-now-the-default-for-new-gradle-builds for further details. + +* Kotlin DSL Primer: https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotlin_dsl +* Kotlin DSL API: https://docs.gradle.org/current/kotlin-dsl/index.html +* Migration from Groovy: https://docs.gradle.org/current/userguide/migrating_from_groovy_to_kotlin_dsl.html + +## IntelliJ IDEA diff --git a/build.gradle.kts b/build.gradle.kts index 2eff01f..1f62e5e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,9 +14,13 @@ * limitations under the License. */ +import net.ltgt.gradle.errorprone.errorprone + plugins { // Apply the java-library plugin for API and implementation separation. `java-library` + alias(libs.plugins.spotless) + alias(libs.plugins.errorprone) } repositories { @@ -29,6 +33,11 @@ dependencies { testImplementation(libs.junit.jupiter) testRuntimeOnly("org.junit.platform:junit-platform-launcher") + + errorprone(libs.nullaway) + api(libs.jspecify) + + errorprone(libs.google.errorprone.core) } // Apply a specific Java toolchain to ease working on different environments. @@ -42,3 +51,35 @@ tasks.named("test") { // Use JUnit Platform for unit tests. useJUnitPlatform() } + +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Static Analysis Tasks + +spotless { + java { + // note: you can use an empty string for all the imports you didn't specify explicitly, '|' to join group without blank line, and '\\#` prefix for static imports + importOrder("java|javax", "org.hibernate", "com.mongo", "", "\\#") + + removeUnusedImports() + + // Cleanthat will refactor your code, but it may break your style: apply it before your formatter + cleanthat() + + palantirJavaFormat(libs.versions.palantir.get()).style("GOOGLE").formatJavadoc(true) + formatAnnotations() // fixes formatting of type annotations, see below + + licenseHeaderFile("copyright.txt") // contains '$YEAR' parameter + } +} + +tasks.withType().configureEach { + options.errorprone { + disableWarningsInGeneratedCode.set(true) + option("NullAway:AnnotatedPackages", "com.mongo.hibernate") + } +} +tasks.compileJava { + // The check defaults to a warning, bump it up to an error for the main sources + options.errorprone.error("NullAway") +} + diff --git a/copyright.txt b/copyright.txt new file mode 100644 index 0000000..b64f50a --- /dev/null +++ b/copyright.txt @@ -0,0 +1,16 @@ +/* + * Copyright 2008-$YEAR MongoDB, Inc. + * + * Licensed 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. + */ + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 811b483..9cd7d74 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,6 +3,19 @@ [versions] junit-jupiter = "5.10.3" +spotless = "6.25.0" +palantir = "2.50.0" +errorprone = "4.0.1" +google-errorprone-core = "2.9.0" +nullaway = "0.10.26" +jspecify = "0.3.0" [libraries] junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } +jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" } +nullaway = { module = "com.uber.nullaway:nullaway", version.ref = "nullaway" } +google-errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "google-errorprone-core" } + +[plugins] +spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } +errorprone = { id = "net.ltgt.errorprone", version.ref = "errorprone" } From 922890cab6b546a20b42c13cb66091ca4eced8b8 Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Fri, 11 Oct 2024 09:29:13 -0400 Subject: [PATCH 2/6] correct some defects as per code reviews --- README.md | 10 ---------- build.gradle.kts | 6 +++--- copyright.txt | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ba03da7..0b61308 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,4 @@ A MongoDB Dialect for the Hibernate ORM ## Build -[Gradle](https://gradle.org/) is the building tool with [Kotlin](https://kotlinlang.org/) DSL as default. - -Starting with Gradle 8.2, creating new builds using gradle init defaults to generating Gradle builds using Kotlin DSL. - -See https://blog.gradle.org/kotlin-dsl-is-now-the-default-for-new-gradle-builds for further details. - -* Kotlin DSL Primer: https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotlin_dsl -* Kotlin DSL API: https://docs.gradle.org/current/kotlin-dsl/index.html -* Migration from Groovy: https://docs.gradle.org/current/userguide/migrating_from_groovy_to_kotlin_dsl.html - ## IntelliJ IDEA diff --git a/build.gradle.kts b/build.gradle.kts index 1f62e5e..cb79ff5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 MongoDB, Inc. + * Copyright 2024-present MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ tasks.named("test") { spotless { java { // note: you can use an empty string for all the imports you didn't specify explicitly, '|' to join group without blank line, and '\\#` prefix for static imports - importOrder("java|javax", "org.hibernate", "com.mongo", "", "\\#") + importOrder("java|javax", "org.hibernate", "com.mongodb", "", "\\#") removeUnusedImports() @@ -75,7 +75,7 @@ spotless { tasks.withType().configureEach { options.errorprone { disableWarningsInGeneratedCode.set(true) - option("NullAway:AnnotatedPackages", "com.mongo.hibernate") + option("NullAway:AnnotatedPackages", "com.mongodb.hibernate") } } tasks.compileJava { diff --git a/copyright.txt b/copyright.txt index b64f50a..14c1b10 100644 --- a/copyright.txt +++ b/copyright.txt @@ -1,5 +1,5 @@ /* - * Copyright 2008-$YEAR MongoDB, Inc. + * Copyright $YEAR-present MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 81759ccae8a333b7411470ed9c4f88a40cfc495e Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Fri, 11 Oct 2024 14:24:35 -0400 Subject: [PATCH 3/6] remove special treatment of hibernate and mongodb package in spotless's import order --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index cb79ff5..d1d4465 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -58,7 +58,7 @@ tasks.named("test") { spotless { java { // note: you can use an empty string for all the imports you didn't specify explicitly, '|' to join group without blank line, and '\\#` prefix for static imports - importOrder("java|javax", "org.hibernate", "com.mongodb", "", "\\#") + importOrder("java|javax", "", "\\#") removeUnusedImports() From fe66d806e320cff4ad81471fa9a2597f5a70dc8f Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Fri, 11 Oct 2024 16:34:38 -0400 Subject: [PATCH 4/6] remove cleanthat usage in spotless --- build.gradle.kts | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d1d4465..514626c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -62,9 +62,6 @@ spotless { removeUnusedImports() - // Cleanthat will refactor your code, but it may break your style: apply it before your formatter - cleanthat() - palantirJavaFormat(libs.versions.palantir.get()).style("GOOGLE").formatJavadoc(true) formatAnnotations() // fixes formatting of type annotations, see below From b3cca6a272573db31646d245a28a2e7e6c821ba9 Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Sun, 13 Oct 2024 21:42:27 -0400 Subject: [PATCH 5/6] further tweaking based on manual testing, including: 1. update .editorconfig to align with palantir 2. remove usage of jspecify (mongo's nullness annotations suffice) 3. remove unnecessary comments --- .editorconfig | 126 ++++++++++++++++++++------------------ build.gradle.kts | 7 +-- gradle/libs.versions.toml | 2 - 3 files changed, 71 insertions(+), 64 deletions(-) diff --git a/.editorconfig b/.editorconfig index 55395b7..9bfc65b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,18 +3,18 @@ root = true [*] charset = utf-8 end_of_line = lf -indent_size = 4 +indent_size = 2 indent_style = space -insert_final_newline = true -max_line_length = 140 -tab_width = 4 -ij_continuation_indent_size = 8 +insert_final_newline = false +max_line_length = 100 +tab_width = 2 +ij_continuation_indent_size = 4 ij_formatter_off_tag = @formatter:off ij_formatter_on_tag = @formatter:on -ij_formatter_tags_enabled = false +ij_formatter_tags_enabled = true ij_smart_tabs = false -ij_visual_guides = none -ij_wrap_on_typing = true +ij_visual_guides = +ij_wrap_on_typing = false [*.java] ij_java_align_consecutive_assignments = false @@ -25,30 +25,32 @@ ij_java_align_multiline_array_initializer_expression = false ij_java_align_multiline_assignment = false ij_java_align_multiline_binary_operation = false ij_java_align_multiline_chained_methods = false +ij_java_align_multiline_deconstruction_list_components = true ij_java_align_multiline_extends_list = false -ij_java_align_multiline_for = true +ij_java_align_multiline_for = false ij_java_align_multiline_method_parentheses = false ij_java_align_multiline_parameters = false ij_java_align_multiline_parameters_in_calls = false ij_java_align_multiline_parenthesized_expression = false ij_java_align_multiline_records = true -ij_java_align_multiline_resources = true +ij_java_align_multiline_resources = false ij_java_align_multiline_ternary_operation = false ij_java_align_multiline_text_blocks = false ij_java_align_multiline_throws_list = false ij_java_align_subsequent_simple_methods = false ij_java_align_throws_keyword = false +ij_java_align_types_in_multi_catch = true ij_java_annotation_parameter_wrap = off ij_java_array_initializer_new_line_after_left_brace = false ij_java_array_initializer_right_brace_on_new_line = false -ij_java_array_initializer_wrap = off +ij_java_array_initializer_wrap = normal ij_java_assert_statement_colon_on_next_line = false ij_java_assert_statement_wrap = off ij_java_assignment_wrap = off -ij_java_binary_operation_sign_on_next_line = false -ij_java_binary_operation_wrap = off +ij_java_binary_operation_sign_on_next_line = true +ij_java_binary_operation_wrap = normal ij_java_blank_lines_after_anonymous_class_header = 0 -ij_java_blank_lines_after_class_header = 0 +ij_java_blank_lines_after_class_header = 1 ij_java_blank_lines_after_imports = 1 ij_java_blank_lines_after_package = 1 ij_java_blank_lines_around_class = 1 @@ -62,19 +64,23 @@ ij_java_blank_lines_before_imports = 1 ij_java_blank_lines_before_method_body = 0 ij_java_blank_lines_before_package = 0 ij_java_block_brace_style = end_of_line +ij_java_block_comment_add_space = false ij_java_block_comment_at_first_column = true +ij_java_builder_methods = ij_java_call_parameters_new_line_after_left_paren = false ij_java_call_parameters_right_paren_on_new_line = false -ij_java_call_parameters_wrap = off +ij_java_call_parameters_wrap = normal ij_java_case_statement_on_separate_line = true ij_java_catch_on_new_line = false ij_java_class_annotation_wrap = split_into_lines ij_java_class_brace_style = end_of_line -ij_java_class_count_to_use_import_on_demand = 100 +ij_java_class_count_to_use_import_on_demand = 999 ij_java_class_names_in_javadoc = 1 +ij_java_deconstruction_list_wrap = normal ij_java_do_not_indent_top_level_class_members = false ij_java_do_not_wrap_after_single_annotation = false -ij_java_do_while_brace_force = never +ij_java_do_not_wrap_after_single_annotation_in_parameter = false +ij_java_do_while_brace_force = always ij_java_doc_add_blank_line_after_description = true ij_java_doc_add_blank_line_after_param_comments = false ij_java_doc_add_blank_line_after_return = false @@ -94,35 +100,32 @@ ij_java_doc_param_description_on_new_line = false ij_java_doc_preserve_line_breaks = false ij_java_doc_use_throws_not_exception_tag = true ij_java_else_on_new_line = false -ij_java_entity_dd_suffix = EJB -ij_java_entity_eb_suffix = Bean -ij_java_entity_hi_suffix = Home -ij_java_entity_lhi_prefix = Local -ij_java_entity_lhi_suffix = Home -ij_java_entity_li_prefix = Local -ij_java_entity_pk_class = java.lang.String -ij_java_entity_vo_suffix = VO ij_java_enum_constants_wrap = off +ij_java_enum_field_annotation_wrap = off ij_java_extends_keyword_wrap = off -ij_java_extends_list_wrap = off +ij_java_extends_list_wrap = normal ij_java_field_annotation_wrap = split_into_lines +ij_java_field_name_prefix = +ij_java_field_name_suffix = ij_java_finally_on_new_line = false -ij_java_for_brace_force = never +ij_java_for_brace_force = always ij_java_for_statement_new_line_after_left_paren = false ij_java_for_statement_right_paren_on_new_line = false -ij_java_for_statement_wrap = off +ij_java_for_statement_wrap = normal ij_java_generate_final_locals = false -ij_java_generate_final_parameters = true -ij_java_if_brace_force = never -ij_java_imports_layout = *,|,javax.**,java.**,|,$* +ij_java_generate_final_parameters = false +ij_java_generate_use_type_annotation_before_type = true +ij_java_if_brace_force = always +ij_java_imports_layout = $*,|,* ij_java_indent_case_from_switch = true -ij_java_insert_inner_class_imports = false +ij_java_insert_inner_class_imports = true ij_java_insert_override_annotation = true ij_java_keep_blank_lines_before_right_brace = 2 ij_java_keep_blank_lines_between_package_declaration_and_header = 2 -ij_java_keep_blank_lines_in_code = 2 +ij_java_keep_blank_lines_in_code = 1 ij_java_keep_blank_lines_in_declarations = 2 -ij_java_keep_control_statement_in_one_line = true +ij_java_keep_builder_methods_indents = false +ij_java_keep_control_statement_in_one_line = false ij_java_keep_first_column_comment = true ij_java_keep_indents_on_empty_lines = false ij_java_keep_line_breaks = true @@ -136,26 +139,34 @@ ij_java_label_indent_size = 0 ij_java_lambda_brace_style = end_of_line ij_java_layout_static_imports_separately = true ij_java_line_comment_add_space = false +ij_java_line_comment_add_space_on_reformat = false ij_java_line_comment_at_first_column = true -ij_java_message_dd_suffix = EJB -ij_java_message_eb_suffix = Bean +ij_java_local_variable_name_prefix = +ij_java_local_variable_name_suffix = ij_java_method_annotation_wrap = split_into_lines ij_java_method_brace_style = end_of_line -ij_java_method_call_chain_wrap = off +ij_java_method_call_chain_wrap = normal ij_java_method_parameters_new_line_after_left_paren = false ij_java_method_parameters_right_paren_on_new_line = false -ij_java_method_parameters_wrap = off +ij_java_method_parameters_wrap = normal ij_java_modifier_list_wrap = false -ij_java_names_count_to_use_import_on_demand = 100 +ij_java_multi_catch_types_wrap = normal +ij_java_names_count_to_use_import_on_demand = 999 +ij_java_new_line_after_lparen_in_annotation = false +ij_java_new_line_after_lparen_in_deconstruction_pattern = true ij_java_new_line_after_lparen_in_record_header = false -ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.* +ij_java_new_line_when_body_is_presented = false +ij_java_packages_to_use_import_on_demand = ij_java_parameter_annotation_wrap = off +ij_java_parameter_name_prefix = +ij_java_parameter_name_suffix = ij_java_parentheses_expression_new_line_after_left_paren = false ij_java_parentheses_expression_right_paren_on_new_line = false ij_java_place_assignment_sign_on_next_line = false ij_java_prefer_longer_names = true ij_java_prefer_parameters_wrap = false ij_java_record_components_wrap = normal +ij_java_repeat_annotations = ij_java_repeat_synchronized = true ij_java_replace_instanceof_and_cast = false ij_java_replace_null_check = true @@ -163,14 +174,9 @@ ij_java_replace_sum_lambda_with_method_ref = true ij_java_resource_list_new_line_after_left_paren = false ij_java_resource_list_right_paren_on_new_line = false ij_java_resource_list_wrap = off +ij_java_rparen_on_new_line_in_annotation = false +ij_java_rparen_on_new_line_in_deconstruction_pattern = true ij_java_rparen_on_new_line_in_record_header = false -ij_java_session_dd_suffix = EJB -ij_java_session_eb_suffix = Bean -ij_java_session_hi_suffix = Home -ij_java_session_lhi_prefix = Local -ij_java_session_lhi_suffix = Home -ij_java_session_li_prefix = Local -ij_java_session_si_suffix = Service ij_java_space_after_closing_angle_bracket_in_type_argument = false ij_java_space_after_colon = true ij_java_space_after_comma = true @@ -188,6 +194,7 @@ ij_java_space_before_class_left_brace = true ij_java_space_before_colon = true ij_java_space_before_colon_in_foreach = true ij_java_space_before_comma = false +ij_java_space_before_deconstruction_list = false ij_java_space_before_do_left_brace = true ij_java_space_before_else_keyword = true ij_java_space_before_else_left_brace = true @@ -218,6 +225,7 @@ ij_java_space_within_empty_array_initializer_braces = false ij_java_space_within_empty_method_call_parentheses = false ij_java_space_within_empty_method_parentheses = false ij_java_spaces_around_additive_operators = true +ij_java_spaces_around_annotation_eq = true ij_java_spaces_around_assignment_operators = true ij_java_spaces_around_bitwise_operators = true ij_java_spaces_around_equality_operators = true @@ -229,6 +237,7 @@ ij_java_spaces_around_relational_operators = true ij_java_spaces_around_shift_operators = true ij_java_spaces_around_type_bounds_in_type_parameters = true ij_java_spaces_around_unary_operator = false +ij_java_spaces_inside_block_braces_when_body_is_present = false ij_java_spaces_within_angle_brackets = false ij_java_spaces_within_annotation_parentheses = false ij_java_spaces_within_array_initializer_braces = false @@ -236,6 +245,7 @@ ij_java_spaces_within_braces = false ij_java_spaces_within_brackets = false ij_java_spaces_within_cast_parentheses = false ij_java_spaces_within_catch_parentheses = false +ij_java_spaces_within_deconstruction_list = false ij_java_spaces_within_for_parentheses = false ij_java_spaces_within_if_parentheses = false ij_java_spaces_within_method_call_parentheses = false @@ -247,11 +257,16 @@ ij_java_spaces_within_synchronized_parentheses = false ij_java_spaces_within_try_parentheses = false ij_java_spaces_within_while_parentheses = false ij_java_special_else_if_treatment = true +ij_java_static_field_name_prefix = +ij_java_static_field_name_suffix = +ij_java_subclass_name_prefix = ij_java_subclass_name_suffix = Impl -ij_java_ternary_operation_signs_on_next_line = false -ij_java_ternary_operation_wrap = off +ij_java_switch_expressions_wrap = normal +ij_java_ternary_operation_signs_on_next_line = true +ij_java_ternary_operation_wrap = normal +ij_java_test_name_prefix = ij_java_test_name_suffix = Test -ij_java_throws_keyword_wrap = off +ij_java_throws_keyword_wrap = normal ij_java_throws_list_wrap = off ij_java_use_external_annotations = false ij_java_use_fq_class_names = false @@ -259,15 +274,14 @@ ij_java_use_relative_indents = false ij_java_use_single_class_imports = true ij_java_variable_annotation_wrap = off ij_java_visibility = public -ij_java_while_brace_force = never +ij_java_while_brace_force = always ij_java_while_on_new_line = false -ij_java_wrap_comments = false +ij_java_wrap_comments = true ij_java_wrap_first_method_in_call_chain = false ij_java_wrap_long_lines = false +ij_java_wrap_semicolon_after_call_chain = false [*.scala] -indent_size = 2 -tab_width = 2 ij_continuation_indent_size = 2 ij_scala_align_composite_pattern = true ij_scala_align_extends_with = 0 @@ -485,8 +499,6 @@ ij_xml_text_wrap = normal ij_xml_use_custom_settings = false [{*.bash,*.sh,*.zsh}] -indent_size = 2 -tab_width = 2 ij_shell_binary_ops_start_line = false ij_shell_keep_column_alignment_padding = false ij_shell_minify_program = false @@ -673,7 +685,6 @@ ij_groovy_while_on_new_line = false ij_groovy_wrap_long_lines = false [{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}] -indent_size = 2 ij_json_keep_blank_lines_in_code = 0 ij_json_keep_indents_on_empty_lines = false ij_json_keep_line_breaks = true @@ -705,7 +716,6 @@ ij_properties_key_value_delimiter = equals ij_properties_spaces_around_key_value_delimiter = false [{*.yaml,*.yml}] -indent_size = 2 ij_yaml_align_values_properties = do_not_align ij_yaml_autoinsert_sequence_marker = true ij_yaml_block_mapping_on_new_line = false diff --git a/build.gradle.kts b/build.gradle.kts index 514626c..4da039d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,8 +35,6 @@ dependencies { testRuntimeOnly("org.junit.platform:junit-platform-launcher") errorprone(libs.nullaway) - api(libs.jspecify) - errorprone(libs.google.errorprone.core) } @@ -63,9 +61,10 @@ spotless { removeUnusedImports() palantirJavaFormat(libs.versions.palantir.get()).style("GOOGLE").formatJavadoc(true) - formatAnnotations() // fixes formatting of type annotations, see below - licenseHeaderFile("copyright.txt") // contains '$YEAR' parameter + formatAnnotations() + + licenseHeaderFile("copyright.txt") // contains '$YEAR' placeholder } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9cd7d74..798ceac 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,11 +8,9 @@ palantir = "2.50.0" errorprone = "4.0.1" google-errorprone-core = "2.9.0" nullaway = "0.10.26" -jspecify = "0.3.0" [libraries] junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } -jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" } nullaway = { module = "com.uber.nullaway:nullaway", version.ref = "nullaway" } google-errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "google-errorprone-core" } From f7e62d989ae9d16ef9e571c7b9c0aaf75cebc754 Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Tue, 15 Oct 2024 10:17:18 -0400 Subject: [PATCH 6/6] revert back deleted jspecify api dependency --- build.gradle.kts | 2 ++ gradle/libs.versions.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 4da039d..e98cadd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,6 +35,8 @@ dependencies { testRuntimeOnly("org.junit.platform:junit-platform-launcher") errorprone(libs.nullaway) + api(libs.jspecify) + errorprone(libs.google.errorprone.core) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 798ceac..fe1218a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,10 +8,12 @@ palantir = "2.50.0" errorprone = "4.0.1" google-errorprone-core = "2.9.0" nullaway = "0.10.26" +jspecify = "0.3.0" [libraries] junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } nullaway = { module = "com.uber.nullaway:nullaway", version.ref = "nullaway" } +jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" } google-errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "google-errorprone-core" } [plugins]