From bd8926fc0bfc64dd997224e6d4aa931726006cda Mon Sep 17 00:00:00 2001 From: matrixdev Date: Mon, 15 Mar 2021 14:03:10 +0200 Subject: [PATCH] [#21] Build error with version 0.3.3 --- README.md | 4 ++-- .../main/java/dev/matrix/roomigrant/compiler/Database.kt | 8 ++++---- build.gradle | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 38e3ea0..c1963bf 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ dependencies { kapt 'androidx.room:room-compiler:2.2.5' // Roomigrant - implementation 'com.github.MatrixDev.Roomigrant:RoomigrantLib:0.3.3' - kapt 'com.github.MatrixDev.Roomigrant:RoomigrantCompiler:0.3.3' + implementation 'com.github.MatrixDev.Roomigrant:RoomigrantLib:0.3.4' + kapt 'com.github.MatrixDev.Roomigrant:RoomigrantCompiler:0.3.4' } ``` diff --git a/RoomigrantCompiler/src/main/java/dev/matrix/roomigrant/compiler/Database.kt b/RoomigrantCompiler/src/main/java/dev/matrix/roomigrant/compiler/Database.kt index 4980371..647ff11 100644 --- a/RoomigrantCompiler/src/main/java/dev/matrix/roomigrant/compiler/Database.kt +++ b/RoomigrantCompiler/src/main/java/dev/matrix/roomigrant/compiler/Database.kt @@ -119,13 +119,13 @@ class Database(val environment: ProcessingEnvironment, element: TypeElement) { code.addComment("Table %S", table.name) code.addStatement("%L = %T()", indices, indicesType) + code.addStatement("%L = %T(%L, %S, %S, %L)", tableInfo, tableInfoType, schemeInfo, table.name, table.createSql(), indices) + + code.addStatement("%L.put(%S, %L)", tablesMap, table.name, tableInfo) for (index in table.indices) { - code.addStatement("%L[%S] = %T(%L, %S, %S)", indices, index.name, IndexInfo::class, tableInfo, index.name, index.createSql(table.name)) + code.addStatement("%L.put(%S, %T(%L, %S, %S))", indices, index.name, IndexInfo::class, tableInfo, index.name, index.createSql(table.name)) } - code.addStatement("%L = %T(%L, %S, %S, %L)", tableInfo, tableInfoType, schemeInfo, table.name, table.createSql(), indices) - code.addStatement("%L[%S] = %L", tablesMap, table.name, tableInfo) - code.addStatement("") } diff --git a/build.gradle b/build.gradle index 1711d72..65c0e23 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext.kotlin_version = '1.4.10' - ext.roomigrant_version = '0.3.3' + ext.roomigrant_version = '0.3.4' repositories { google()