Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ormlite_config.txt is created inside assets folder instead of raw #25

Open
tundratier opened this issue Apr 5, 2018 · 1 comment
Open

Comments

@tundratier
Copy link

tundratier commented Apr 5, 2018

I've just upgraded from 1.0.12 to 3.0.4 of the OrmGAP plugin and the config file is placed inside the src/main/assets directory instead of src/main/res/raw. Is there a config option to change the file location? Because the OrmLiteSqliteOpenHelper tries to open the file from the raw resources.

I am using Gradle 4.4 and Android Gradle PLugin 3.1.0

@tundratier
Copy link
Author

I've missed that the OrmLiteSqliteOpenHelper has another constructor that accepts an InputStream of the config file.

If the change from raw to assets was intended, can you please adjust the how-to on the index page as follows:

public DatabaseHelper(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION, context.getAssets().open("ormlite_config.txt"));
}

Personally I'd still prefer the raw resource because the resource id is linked statically which prevents typo errors in the file name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant