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

Dynamic robovm.properties ? #61

Open
denisk20 opened this issue Apr 10, 2016 · 2 comments
Open

Dynamic robovm.properties ? #61

denisk20 opened this issue Apr 10, 2016 · 2 comments

Comments

@denisk20
Copy link

I'm interested in being able to set the values of robovm.properties dynamically. Specifically, I want app.build to be set from gradle config. However, I can't make it work.
So far I have tried:

  1. in build.gradle: project.ext."app.build" = 333
  2. in command line: ./gradlew createIPA -Papp.build=444

I have skimmed through the sources of the plugin and it looks like robovm.properties is not handled by the plugin, but by robovm itself.

I'm doing all this in a libGDX project.

Is there a way to set values of robovm.properties dynamically? I can of course generate the whole file on the fly, but I'm not sure if this is an overkill since I only need to set app.build.

@denisk20
Copy link
Author

I have ended up generating robovm.properties on the fly, in ios/build.gradle (spacing is important):

    ext {
        appVersion = '1.0'
        buildNumber = getBuildNumber()
       appName = 'My App'
    }

    task generateRobovmProperties << {
        def file = new File(project.projectDir.path + '/robovm.properties');

        String text ="""app.version=$appVersion
app.id=com.myapp
app.mainclass=com.myapp.ios.IOSLauncher
app.executable=IOSLauncher
app.name=$appName
app.build=$buildNumber"""
        file.write(text)
    }

I then run

./gradlew ios:generateRobovmProperties

@davidgiga1993
Copy link

This is a very old task, will there be someone working on this or should I also go with generating the file on the fly?
It would be nice if properties set by the JVM would override the one from the file. Then we could just define it using gradle

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

2 participants