Skip to content

ryarnyah/querydsl-gradle-plugin

Repository files navigation

QueryDSL Gradle Plugin

Port of QueryDSL Maven plugin for Gradle.

HowTo To use

plugins {
    //...
    id("com.github.ryarnyah.querydsl") version "0.0.3"
}

tasks {
    queryDslMetadataExport {
        jdbcDriver = "org.h2.Driver"
        jdbcUser = "sa"
        jdbcPassword = ""
        jdbcUrl = "jdbc:h2:./test;AUTO_SERVER=TRUE"
        packageName = "com.example.querydsl"

        exportBeans = true
        exportTables = true
    }
}

Tasks supported

queryDslMetadataExport

tasks {
    queryDslMetadataExport {
        jdbcDriver = "org.h2.Driver"
        jdbcUser = "sa"
        jdbcPassword = ""
        jdbcUrl = "jdbc:h2:./test;AUTO_SERVER=TRUE"
        packageName = "com.example.querydsl"

        exportBeans = true
        exportTables = true
    }
}

queryDslJdoExport

tasks {
    queryDslJdoExport {
        packages = arrayOf("com.example.test")
    }
}

queryDslJpaExport

tasks {
    queryDslJpaExport {
        packages = arrayOf("com.example.test")
    }
}

queryDslGenericExport

tasks {
    queryDslGenericExport {
        packages = arrayOf("com.example.test")
    }
}

Current status

  • Support metadata export
  • Experimental support for other export tasks