Merge "Add Instabug-Android to run_on_as_app.py"
diff --git a/tools/as_utils.py b/tools/as_utils.py
index 5f224a6..7a6528a 100644
--- a/tools/as_utils.py
+++ b/tools/as_utils.py
@@ -127,7 +127,7 @@
       if '-printconfiguration' not in line:
         f.write(line)
     # Check that there is a line-break at the end of the file or insert one.
-    if lines[-1].strip():
+    if len(lines) and lines[-1].strip():
       f.write('\n')
     f.write('-printconfiguration {}\n'.format(destination))
 
@@ -159,7 +159,7 @@
   Move(src, dst, quiet=quiet)
 
 def MoveFile(src, dst, quiet=False):
-  assert os.path.isfile(src)
+  assert os.path.isfile(src), "Expected a file to be present at " + src
   Move(src, dst, quiet=quiet)
 
 def MoveProfileReportTo(dest_dir, build_stdout, quiet=False):
diff --git a/tools/run_on_as_app.py b/tools/run_on_as_app.py
index 754cba8..105e958 100755
--- a/tools/run_on_as_app.py
+++ b/tools/run_on_as_app.py
@@ -97,6 +97,14 @@
       'git_repo': 'https://github.com/christofferqa/Simple-Calendar',
       'signed-apk-name': 'calendar-release.apk'
   },
+  'sqldelight': {
+      'app_id': 'com.example.sqldelight.hockey',
+      'git_repo': 'https://github.com/christofferqa/sqldelight.git',
+      'app_module': 'sample/android',
+      'archives_base_name': 'android',
+      'min_sdk': 14,
+      'compile_sdk': 28,
+  },
   'tachiyomi': {
       'app_id': 'eu.kanade.tachiyomi',
       'git_repo': 'https://github.com/sgjesse/tachiyomi.git',
@@ -384,7 +392,7 @@
 
   releaseTarget = config.get('releaseTarget')
   if not releaseTarget:
-    releaseTarget = app_module + ':' + 'assemble' + (
+    releaseTarget = app_module.replace('/', ':') + ':' + 'assemble' + (
         flavor.capitalize() if flavor else '') + 'Release'
 
   # Value for property android.enableR8.