title: Android Room can not create JSON schema for testing migrations
body: <p>I have created migration from 1 to 2 version of my database.</p>
  
  <p>I have the app in a few modules like:</p>
  
  <ul>
  <li>app</li>
  <li>data</li>
  <li>domain</li>
  </ul>
  
  <p>I have tried adding this into build.gradle of app and data modules:</p>
  
  <pre><code>javaCompileOptions {
          annotationProcessorOptions {
              arguments = ["room.schemaLocation":  "$projectDir/schemas".toString()]
          }
      }
  
      sourceSets {
          androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
      }
  </code></pre>
  
  <p>Here is my MigrationTest class:</p>
  
  <pre><code>@RunWith(AndroidJUnit4.class)
  public class MigrationTest {
  
  private static final String TEST_DB = "migration-test";
  
  @Rule public MigrationTestHelper helper;
  
  private Profile profile;
  
  public MigrationTest() {
  helper = new MigrationTestHelper(
      InstrumentationRegistry.getInstrumentation(),
      AppDatabase.class.getCanonicalName(),
      new FrameworkSQLiteOpenHelperFactory());
  }
  
  @Before
  public void setUp(){
  profile = createProfile();
  }
  
  @Test public void migrate1To2() throws IOException {
      SupportSQLiteDatabase db = helper.createDatabase(TEST_DB, 1);
      insertProfile(db);
      db.close();
      AppDatabase database = (AppDatabase) helper.runMigrationsAndValidate(TEST_DB, 2, true, MIGRATION_1_2);
      Single&lt;ProfileData&gt; profileDataSingle = database.profileDao().getById("userId");
      ProfileData profileData = profileDataSingle.blockingGet();
      Profile currentProfile = ProfileMapper.transform(profileData);
      assertEquals(currentProfile.getUserId(), profile.getUserId());
  }
  </code></pre>
  
  <p>Here is failing test:</p>
  
  <blockquote>
    <p>java.io.FileNotFoundException: Cannot find the schema file in the
    assets folder. Make sure to include the exported json schemas in your
    test assert inputs. See
    <a href="https://developer.android.com/topic/libraries/architecture/room.html#db-migration-testing" rel="noreferrer">https://developer.android.com/topic/libraries/architecture/room.html#db-migration-testing</a>
    for details. Missing file: org.app.app.data.sql.AppDatabase/1.json</p>
  </blockquote>