Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

1.9 KB
Raw Blame
plugins {
    id 'com.gradleup.shadow' version '9.6.1' apply false
}

def infrastructureProjects = ['common', 'test-support'] as Set
def legacyStandaloneProjects = ['mongodb', 'kafka'] as Set
def pooledJdbcProjects = [
    'access', 'bigquery', 'dameng', 'databend', 'databricks', 'db2', 'exasol',
    'firebird', 'gbase8a', 'gbase8c', 'gbase8s', 'goldendb', 'h2', 'h2-legacy', 'highgo',
    'ignite', 'ignite3', 'informix', 'iris', 'cache', 'kylin', 'oceanbase-oracle', 'oscar', 'saphana',
    'snowflake', 'spanner', 'spark', 'sqlserver-legacy', 'sundb', 'teradata', 'trino', 'uxdb',
    'vertica', 'yashandb', 'transwarp'
] as Set
def agentProjects = subprojects.findAll { !infrastructureProjects.contains(it.name) }
def jdbcAgentProjects = agentProjects.findAll { !legacyStandaloneProjects.contains(it.name) }

allprojects {
    repositories {
        mavenCentral()
    }
}

subprojects {
    if (name == 'test-support') {
        apply plugin: 'java-library'
    } else {
        apply plugin: 'java'
    }

    java {
        toolchain {
            languageVersion = JavaLanguageVersion.of(21)
        }
    }

    dependencies {
        testImplementation 'org.junit.jupiter:junit-jupiter:5.14.4'
        testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.14.4'
    }

    tasks.withType(Test).configureEach {
        useJUnitPlatform()
    }
}

configure(agentProjects) {
    apply plugin: 'com.gradleup.shadow'

    tasks.named('shadowJar') {
        archiveBaseName = "dbx-agent-${project.name}"
        archiveClassifier = ''
    }
}

configure(jdbcAgentProjects) {
    dependencies {
        implementation project(':common')
        testImplementation project(':test-support')
    }
}

configure(agentProjects.findAll { pooledJdbcProjects.contains(it.name) }) {
    dependencies {
        implementation 'com.zaxxer:HikariCP:7.1.0'
        runtimeOnly 'org.slf4j:slf4j-nop:2.0.20'
    }
}