Created
August 1, 2011 02:39
-
-
Save mike-neck/1117489 to your computer and use it in GitHub Desktop.
XML builder for Android Manifest file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.xml.MarkupBuilder | |
def writer = new StringWriter() | |
def manifest = new MarkupBuilder(writer) | |
writer << '<?xml version="1.0" encoding="utf-8"?>\n' | |
manifest.manifest( | |
'xmlns:android' : 'http://schemas.android.com/apk/res/android', | |
'package' : 'orz.mikeneck.android.inst', | |
'android:version' : '1', | |
'android:versionName' : '1.0'){ | |
'uses-sdk'('android:minSdkVersion' : '7') | |
application( | |
'android:icon' : '@drawable/icon', | |
'android:label' : '@string/app_name'){ | |
activity( | |
'android:name' : '.InstActivity', | |
'android:label' : '@string/app_name', | |
'android:theme' : '@style/MoveTheme'){ | |
'intent-filter'{ | |
action('android:name' : 'android.intent.action.MAIN') | |
category('android:name' : 'android.intent.category.LAUNCHER') | |
} | |
} | |
activity( | |
'android:name' : '.NextActivity', | |
'android:label' : '@string/app_name', | |
'android:theme' : '@style/MoveTheme') | |
} | |
} | |
writer.toString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment