Skip to content
Open
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
name: Scan dependencies for vulnerabilities
working_directory: ~/data-browser/public-api
command: |
./project.rb gradle dependencyCheckAnalyze --info
./gradlew dependencyCheckAnalyze --info

public-ui-build-test:
<<: *defaults
Expand Down
23 changes: 14 additions & 9 deletions public-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
SPRING_FRAMEWORK_VERSION = '6.1.5'
SPRING_SECURITY_VERSION = '6.2.3'
LOGBACK_VERSION = '1.5.5'
JACKSON_VERSION = '2.16.1'
JACKSON_VERSION = '2.18.2'
SPRING_DEPENDENCY_MANAGEMENT_VERSION = '1.0.13.RELEASE'
OKHTTP_VERSION = '4.12.0'
LIQUIBASE_VERSION = '4.27.0'
Expand Down Expand Up @@ -37,7 +37,7 @@ plugins {
id 'idea'
id 'war'
id 'org.springframework.boot' version '3.2.0'
id 'org.owasp.dependencycheck' version '7.4.4'
id 'org.owasp.dependencycheck' version '12.1.0'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'org.hidetake.swagger.generator' version '2.19.2'
id 'com.google.cloud.tools.appengine-appenginewebxml' version '2.8.0'
Expand Down Expand Up @@ -70,7 +70,6 @@ configurations {
integrationRuntime.extendsFrom testRuntime
integrationImplementation.extendsFrom implementation
integrationRuntimeOnly.extendsFrom runtimeOnly
__swaggerCodegenV3__
generatedCompile
all { exclude group: 'com.google.guava', module: 'guava-jdk5' }
toolsImplementation.extendsFrom implementation
Expand Down Expand Up @@ -174,9 +173,11 @@ repositories {
mavenCentral()
}



dependencies {
swaggerCodegen "io.swagger.codegen.v3:swagger-codegen-cli:$project.ext.SWAGGER_3_CODEGEN_VERSION"
annotationProcessor "org.mapstruct:mapstruct-processor:$project.ext.MAPSTRUCT_VERSION"
__swaggerCodegenV3__ "io.swagger.codegen.v3:swagger-codegen-cli:$project.ext.SWAGGER_3_CODEGEN_VERSION"
generatedCompile "org.springframework.boot:spring-boot-starter-data-rest:$project.ext.SPRING_BOOT_VERSION"
generatedCompile "org.springframework.boot:spring-boot-starter-validation:$project.ext.SPRING_BOOT_VERSION"
generatedCompile "com.squareup.okhttp3:okhttp:$project.ext.OKHTTP_VERSION"
Expand Down Expand Up @@ -237,7 +238,7 @@ dependencies {
implementation 'com.google.guava:guava:32.0.1-jre'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.protobuf:protobuf-java:3.25.3'
implementation 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20211018.2'
implementation 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20240325.1'
implementation "org.hibernate.orm:hibernate-core:$project.ext.HIBERNATE_VERSION"
implementation "org.hibernate.orm:hibernate-community-dialects:$project.ext.HIBERNATE_VERSION"
implementation('org.apache.tomcat:tomcat-jdbc:10.0.23')
Expand Down Expand Up @@ -319,7 +320,6 @@ swaggerSources {
databrowser {
inputFile = file('src/main/resources/public-api.yaml')
code {
configuration = configurations.__swaggerCodegenV3__
language = 'spring'
outputDir = file(SWAGGER_3_CODEGEN_DIR)
templateDir = file(SWAGGER_TEMPLATE_DIR)
Expand All @@ -340,7 +340,6 @@ swaggerSources {
databrowserApiClient {
inputFile = file('src/main/resources/public-api.yaml')
code {
configuration = configurations.__swaggerCodegenV3__
language = 'java'
outputDir = file(SWAGGER_3_CODEGEN_DIR)
templateDir = file(SWAGGER_TEMPLATE_DIR)
Expand All @@ -361,7 +360,6 @@ swaggerSources {
workbenchClient {
inputFile = file('src/main/resources/private-workbench.yaml')
code {
configuration = configurations.__swaggerCodegenV3__
language = 'java'
outputDir = file(SWAGGER_3_CODEGEN_DIR)
templateDir = file(SWAGGER_TEMPLATE_DIR)
Expand Down Expand Up @@ -453,7 +451,14 @@ dependencies {
}


dependencyCheck {
nvd {
apiKey = System.getenv('NVD_API_KEY')
}
}

group = 'org.pmiops.allofus.workbench'
version = '0.1.0'
sourceCompatibility = 17
targetCompatibility = 17
targetCompatibility = 17

16 changes: 6 additions & 10 deletions public-api/db-cdr/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'application'
id 'org.liquibase.gradle' version '2.1.1'
id 'org.liquibase.gradle' version '2.2.0'
}


Expand Down Expand Up @@ -31,46 +31,42 @@ dependencies {
liquibase {
activities {
schema {
changeLogFile "changelog-schema/db.changelog-master.xml"
changelogFile "changelog-schema/db.changelog-master.xml"
url "jdbc:mysql://${db_host}:${db_port}/${db_name}"
username "liquibase"
password "${liquibase_password}"
classpath "$rootDir"
showBanner false
}
data {
if (project.hasProperty('contexts')) {
contexts contexts
}
changeLogFile "changelog-data/db.changelog-master.xml"
changelogFile "changelog-data/db.changelog-master.xml"
url "jdbc:mysql://${db_host}:${db_port}/${db_name}"
username "liquibase"
password "${liquibase_password}"
classpath "$rootDir"
showBanner false
}
add_bigdata_indexes {
if (project.hasProperty('contexts')) {
contexts contexts
}
changeLogFile "changelog-bigdata/db.changelog-add-indexes.xml"
changelogFile "changelog-bigdata/db.changelog-add-indexes.xml"
url "jdbc:mysql://${db_host}:${db_port}/${db_name}"
username "liquibase"
password "${liquibase_password}"
classpath "$rootDir"
showBanner false
}
drop_bigdata_indexes {
if (project.hasProperty('contexts')) {
contexts contexts
}
changeLogFile "changelog-bigdata/db.changelog-drop-indexes.xml"
changelogFile "changelog-bigdata/db.changelog-drop-indexes.xml"
url "jdbc:mysql://${db_host}:${db_port}/${db_name}"
username "liquibase"
password "${liquibase_password}"
classpath "$rootDir"
showBanner false
}
runList = project.ext.runList
runList = project.hasProperty('runList') ? project.getProperty('runList') : 'schema'
}
}
6 changes: 3 additions & 3 deletions public-api/db/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'application'
id 'org.liquibase.gradle' version '2.1.1'
id 'org.liquibase.gradle' version '2.2.0'
}

repositories {
Expand Down Expand Up @@ -28,11 +28,11 @@ dependencies {
liquibase {
activities {
main {
changeLogFile "changelog/db.changelog-master.xml"
changelogFile "changelog/db.changelog-master.xml"
url "jdbc:mysql://${db_host}:${db_port}/databrowser"
username "liquibase"
password "${liquibase_password}"
}
runList = project.ext.runList
runList = project.hasProperty('runList') ? project.getProperty('runList') : 'main'
}
}
2 changes: 1 addition & 1 deletion public-api/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
8 changes: 4 additions & 4 deletions public-api/libproject/devstart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ def update_cdr_config_options(cmd_name, args)
def update_cdr_config_for_project(cdr_config_file, dry_run)
common = Common.new
common.run_inline %W{
gradle updateCdrConfig
./gradlew updateCdrConfig
-PappArgs=['#{cdr_config_file}',#{dry_run}]}
end

Expand Down Expand Up @@ -1006,7 +1006,7 @@ def migrate_database(dry_run = false)
common = Common.new
common.status "Migrating main database..."
Dir.chdir("db") do
run_inline_or_log(dry_run, %W{gradle --info update -PrunList=main})
run_inline_or_log(dry_run, %W{../gradlew update -PrunList=main})
end
end

Expand All @@ -1026,8 +1026,8 @@ def load_config(project, dry_run = false)

common = Common.new
common.status "Loading #{config_json} into database..."
run_inline_or_log(dry_run, %W{gradle --info loadConfig -Pconfig_key=main -Pconfig_file=config/#{config_json}})
run_inline_or_log(dry_run, %W{gradle --info loadConfig -Pconfig_key=cdrBigQuerySchema -Pconfig_file=config/cdm/cdm_5_2.json})
run_inline_or_log(dry_run, %W{./gradlew loadConfig -Pconfig_key=main -Pconfig_file=config/#{config_json}})
run_inline_or_log(dry_run, %W{./gradlew loadConfig -Pconfig_key=cdrBigQuerySchema -Pconfig_file=config/cdm/cdm_5_2.json})
end

def with_cloud_proxy_and_db(gcc, service_account = nil, key_file = nil)
Expand Down
2 changes: 1 addition & 1 deletion public-api/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ pluginManagement {
}
}
}
}
}