Skip to content

Commit

Permalink
Remove some stuff we said we would remove (cashapp#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alec Strong committed Jun 1, 2020
1 parent c15c8f4 commit ec4a5f2
Showing 1 changed file with 0 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.squareup.sqldelight.gradle

import groovy.lang.Closure
import java.io.File
import org.gradle.api.GradleException
import org.gradle.api.Project
import org.gradle.api.file.FileCollection
import org.gradle.util.ConfigureUtil

open class SqlDelightExtension {
Expand All @@ -14,16 +11,6 @@ open class SqlDelightExtension {

var linkSqlite = true

// TODO: Remove these after 1.1.0
var packageName: String? = null
set(value) = newDsl()
var className: String? = null
set(value) = newDsl()
var sourceSet: FileCollection? = null
set(value) = newDsl()
var schemaOutputDirectory: File? = null
set(value) = newDsl()

fun methodMissing(name: String, args: Any): Any {
configuringDatabase?.methodMissing(name, args)?.let { return it }

Expand Down Expand Up @@ -71,27 +58,4 @@ open class SqlDelightExtension {

databases.add(database)
}

companion object {
private fun newDsl(): Nothing = throw GradleException("""
|Format of specifying databases has changed from:
|
|sqldelight {
| className = "MyDatabase"
| packageName = "com.example"
| sourceSet = files("src/main/sqldelight")
| schemaOutputDirectory = file("src/main/sqldelight/migrations")
|}
|
|to
|
|sqldelight {
| MyDatabase {
| packageName = "com.example"
| sourceFolders = ["sqldelight"]
| schemaOutputDirectory = file("src/main/sqldelight/migrations")
| }
|}
""".trimMargin())
}
}

0 comments on commit ec4a5f2

Please sign in to comment.