S
S
sanke462022-02-03 11:37:13
Android
sanke46, 2022-02-03 11:37:13

Can I convert a CSV file to a string.xml file using Gradle?

I want to have one CSV file where I can change the text, but after creating the project, all rows generate a string.xml where all rows have the correct id and value (or if the user opens the application, all CSV values ​​are added to the DB) How I can use?

Example:
61fb941686452114240861.png

<?xml version="1.0" encoding="utf-8"?>
    <resources xmlns:tools="http://schemas.android.com/tools">
        <string name="app_name">APP</string>
        <string name="hello">Hello</string>
    </resources>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2022-02-03
@sanke46

Yes. You need to write a Gradle plugin that implements the CSV -> XML conversion logic and use it. For the details of plugin development, I refer to the Gradle documentation, everything is perfectly written there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question