Skip to content

Instantly share code, notes, and snippets.

View fredgrott's full-sized avatar
👾
focusing on flutter cross platform mobile dev

Fred Grott fredgrott

👾
focusing on flutter cross platform mobile dev
View GitHub Profile
@fredgrott
fredgrott / ant-recorder
Created April 29, 2011 13:12
howto enable log recording in ant
<property name="log.dir" location="${basedir}/build/log"/>
<mkdir dir="${log.dir}"/>
<!-- no need to adjust logging levels just catch everything -->
<record name="log-${TSTAMP}-${DSTAMP}.txt" action="start"/>
@fredgrott
fredgrott / ant-tstamp-format
Created April 29, 2011 13:39
ant tstamp format
<tstamp>
<format property="TODAY_US" pattern="MMMM-d-yyyy" locale="en,US"/>
<format property="TSTAMP" pattern="hh:mm aa"/>
<format property="DSTAMP" pattern="MMMM-d-yyyy"/>
</tstamp>
@fredgrott
fredgrott / eclipse-ini-file
Created April 29, 2011 14:48
eclipse settings in ini file for Java7-AMD-2cpus-2.6 GHZ-MS windows
-vm C:/Oracle/Java/jdk1.7.0ea/bin
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110321-2120.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110321
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
@fredgrott
fredgrott / eclipse-checkstyle-android-best-practices
Created April 29, 2011 14:57
eclipse checkstyle checks for android
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
Checkstyle-Configuration: Android checkstyle by Enea
Description: none
-->
@fredgrott
fredgrott / eclipse-pmd-ruleset-for-android
Created April 29, 2011 15:06
eclipse pmd ruleset for andorid
<?xml version="1.0"?>
<ruleset name="Android Application Rules"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Ruleset for Android application</description>
<exclude-pattern>.*/R.java</exclude-pattern>
@fredgrott
fredgrott / eclipse-android-formatting
Created April 29, 2011 15:46
eclipse android code formatting
<?xml version="1.0" encoding="UTF-8"?>
<profiles version="10">
<profile name="Android" version="10">
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
@fredgrott
fredgrott / eclipse-android-importorder
Created April 29, 2011 15:47
eclipse android importorder
#Organize Import Order
#Wed Apr 04 11:32:05 CDT 2007
4=javax
3=java
2=android
1=org
0=com
@fredgrott
fredgrott / javadoc-apiviz-android
Created May 14, 2011 17:21
javadoc-apiviz-android
Picture:
https://lh6.googleusercontent.com/_dCsxxQGdwps/Tc64B1JhtTE/AAAAAAAAAkU/9iMAjHfJd04/s160-c/Apiviz.jpg
or: https://picasaweb.google.com/fred.grott/Apiviz?feat=directlink
from local.properties:
javadoc.stylesheet=C:/Google/Android/android-sdk/docs/assets/android-developer-docs.css
javadoc.linkoffline=http://d.android.com/reference C:/Google/Android/android-sdk/docs/reference
@fredgrott
fredgrott / jdepend-ant-task-android
Created May 14, 2011 19:31
jdepend-ant-task-android
Jdepend is the weird one that most get wrong and hence do not use when they should,
they key is getting the paths right:
<path id="jdepend.paths">
<fileset dir="build/classes">
<include name="**/*.class"/>
</fileset>
<fileset dir="${anttasklibs.dir}/jdepend" includes="jdepend-2.9.1.jar"/>
</path>
@fredgrott
fredgrott / android test_rules_coverage-target
Created June 1, 2011 14:47
android test_rules_coverage-target
test_rules is incorrect for coverage target for the coverage file locations and report generation..correcteed to:
<target name="coverage" depends="-set-coverage-classpath, -install-instrumented, install"
description="Runs the tests against the instrumented code and generates
code coverage report">
<run-tests-helper emma.enabled="true">
<extra-instrument-args>
<arg value="-e" />
<arg value="coverageFile" />
<arg value="${emma.dump.file}" />