Wiki

Clone wiki

nbandroid / Development

NBAndroid Development

Open source part is hosted at https://bitbucket.org/nbandroid/nbandroid

To build it locally some customization is needed. Following is an example of nbproject/private/platform-private.properties file

nbplatform.active=nb73
nbplatform.nb73.harness.dir=/path/to/netbeans-7.3/harness
nbplatform.nb73.netbeans.dest.dir=/path/to/netbeans-7.3
test-unit-sys-prop.test.all.android.sdks.home=/path/to/android-sdk-linux
test-unit-sys-prop.test.all.maven.home=/path/to/apache-maven-3.0.4
test-unit-sys-prop.test.all.ant.home=/path/to/apache-ant-1.9.2
run.args.extra=-J-Dorg.netbeans.modules.android.level=FINER

The idea is to build sources using Java 7 and develop again NetBeans 7.3. These baseline change as new versions are released.

Continuous build

Jenkins is run on the same virtual server as nbandroid.org website. Unfortunately the server is not strong enough to run test with Jenkins/Ant/JUnit test runner/ADB/Gradle/processes started from gradle build (namely 'dex'). It means Jenkins slave connects remotely that is capable to run these tests. To set up the slave it is necessary:

  • install jenkins-slave (.deb from jessie and customize URL)
  • add android user with /var/lib/android as home and install Android SDK into /var/lib/android/android-sdk-linux (not sure if Android plugin for jenkins is able to do this)
  • fix aapt location for older Maven support http://stackoverflow.com/a/16937175/771055
  • install Java
  • install Gradle
  • run some Maven build on this slave to autoinstall Maven
  • setup .m2/settings.xml to access Nexus repository
  • bootstrap Maven project archetype for Android development ~/tools/hudson.tasks.Maven_MavenInstallation/Maven-3.0.4/bin/mvn archetype:generate -DarchetypeArtifactId=android-quickstart -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.11 -DgroupId=your.company -DartifactId=my-android-application and build this project

Updated