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
def manifestVersionName() { | |
def manifestFile = file(project.projectDir.absolutePath + '/AndroidManifest.xml') | |
def ns = new groovy.xml.Namespace("http://schemas.android.com/apk/res/android", "android") | |
def xml = new XmlParser().parse(manifestFile) | |
return xml.attributes()[ns.versionName].toString() | |
} | |
def manifestVersionCode() { | |
def manifestFile = file(project.projectDir.absolutePath + '/AndroidManifest.xml') | |
def ns = new groovy.xml.Namespace("http://schemas.android.com/apk/res/android", "android") |
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
//from http://www.egeek.me/2013/12/07/gradle-auto-detect-android-sdk-and-build-tools-versions/ | |
import org.codehaus.groovy.runtime.StackTraceUtils | |
String androidSDKDir() { | |
def androidExecPath = new ByteArrayOutputStream() | |
try { | |
exec { | |
commandLine 'which', 'android' | |
standardOutput = androidExecPath | |
} |
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
svn dev style like this | |
-- | |
you: | |
svn cp /trunk /branches/xxx | |
svn co /branches/xxx | |
ooxx... ooxx.. | |
svn ci -m "ooxx" | |
sb: | |
cd trunk |
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
DBPageViewController * pc = [self getPageController:a.toPageId]; | |
pc.refer = pid; | |
[self addChildViewController:pc]; | |
[self.view addSubview:pc.view]; | |
CGFloat width = self.view.frame.size.width; | |
CGFloat height = self.view.frame.size.height; | |
pc.view.frame = CGRectMake(width, 0, width, height); | |
DBPageViewController * pfc = [self getPageController:a.fromPageId]; |