How to configure jenkins with titanium studio to work? - android

I want to develop a mobile application with titanium. Before starting I should first configure SVN and jenkins with titanium studio. I have already installed a plugin svn: subversion plugin on jenkins server plus another plugin named Eclipse plugin on titanium studio. Now I want to configure titanium with jenkins. I searched jenkins plugins available and I found a plugin called: android lint plugin.
Is what I must also install it?

Configure your repository in jenkins (SVN, git..) and install the Titanium CLI.
Add a buildstep to the Jenkins buildprocess for this project, which invokes a script in the Titanium folder. Perhaps you need to unlock your mac keychain before starting that build script, for more information have a look at http://www.egeek.me/2013/02/23/jenkins-and-xcode-user-interaction-is-not-allowed/ . If you combine the call of the build script with the unlocking, everything will run fine automatically.
The build.sh contains the call for the Titanium CLI:
titanium build --force --developer-name "YOURDEVNAME" --pp-uuid "YOURUUID" --platform ios --build-only --target device --device-family universal
This will build the project and create a .ipa in the folder build/iphone/build/Debug-iphoneos/

Related

Gradle version to use with Android/Cordova CLI

I currently use Cordova CLI on Windows to build hybrid Android apps. I am in the process of moving my development mover to a headless Ubuntu server. Getting java, NVM, Node, Android SDK and Cordova CLI installed on Ubuntu has not been a problem. Having done so and created the customary Cordova hello world project,
cordova create hello com.example.hello HelloWorld
I proceeded to add the Android platform
cordova plaform add android
and then attempted to build
cordova build android
at which point I was told
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Installing Gradle by following the instructions given here - I am NOT installing Android Studio and am working on a headless Ubuntu machine so automatic Gradle installation is not an option - is not a problem. However, it is not clear to me which version of Gradle I should install.
I do not want to break my current Cordova project so I am trying to replicate the current Windows/Cordova CLI setup as closely as I can
Node 8.9.2
Java 8
Gradle ???
Dipping inside the gradle-wrapper.properties file in my existing project I find
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
I have noted that when I compile the project at present there are some ominous warnings about features to be removed from future versions of Gradle that are shown. I could experiment with using gradle-2.10 but it is not entirely clearr to me that it would indeed be the right version. Hopefully, someone here will be able to point me in the right direction.
First, clean up the project
cordova clean android
Then, force the cordova to use the distribution url with the version you want, in this case: gradle-6.3
export CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL=https\\://services.gradle.org/distributions/gradle-6.3-all.zip
Then, build your application.
cordova build android --release

How to convert the ionic project in to android app

i had build the ionic project (sample in 'www' folder) and run the sample in browser. but i need to convert the sample/project in to android app, and want to test that sample in my android phone. please provide what are all the software needed to do this and what are all the step by step procedure.
You will need the Android SDK to compile Android code. Set ANDROID_HOME environment variable to the SDK location.
On windows: set ANDROID_HOME=/path/to/sdk
From the command line, run the following command which generates an Android project:
ionic add platform android
Then build an apk file using this command:
ionic build android
Copy the apk to an Android device for testing.
The next step after starting an ionic project and building the app is deployment.
Make sure your device connected to your machine. Make sure android ionic support is enabled via $ionic platform add android. Check that android is supported via $ionic platform list.
Then build your app.
$ionic build android and run it $ionic run android
This should run to the connected device to test. You can also use emulators by adjusting the run syntax.

Build Cordova project on Windows

I am trying to build a Cordova project on Windows using the steps I was given by the team who developed it.
Install Bower, Cordova CLI, Grunt CLI, SASS/Compass/sass-globbing gems
grunt build
cordova platforms add android
Then trying to run grunt emulate android but getting an error. I have the Android SDK installed and can fire up an emulator but I'm getting the following when trying to run that command:
Warning: Task "android" not found. Use --force to continue.
What am I doing wrong? I'm new to Cordova/PhoneGap development and all this interplay between packages is daunting.
You probably should run
cordova run android or grunt emulate:android
First part with cordova CLI should run all the time, and no need to use Grunt to launch application, if all assets are prepared.
Grunt part is just a guess work based on how I would organize Gruntfile.js and I could be wrong here. Without seeing more details, hard to tell you more.

Cordova 3.4: How to Manually Install a Plugin

I would like to manually install this plugin into my Android application, which is built on Cordova 3.4. The plugin is compatible with Cordova up to v3.1. The plugin checks to see if geolocation via GPS is enabled on a device.
I've attempted referencing the plugin in res/xml/config.xml, however this reference is removed each time I run cordova build android. The result is that when I run the program I get a Class not found error.
Any thoughts on this particular scenario or just how to manually install a Cordova 3.4 plugin would be greatly appreciated.
Many Thanks!
Add Plugin Features
If you use a platform-specific workflow, you use a lower-level Plugman command-line interface, separately for each targeted platform.
Installing Plugman
To install plugman, you must have node installed on your machine. Then you can run the following command from anywhere in your environment to install plugman globally, so that it is available from any directory: $ npm install -g plugman
Adding a Plugin
Once you have installed Plugman and have created a Cordova project, you can start adding plugins to the platform:
Check this link : Plugman to manage Plugin
Edited : Plugman to Manage Plugins (3.4.0)

Cordova build android

When I want to try ionic weather app (https://github.com/driftyco/ionic-weather/) I've got problems when I wanted to build android to my phone-gap application using cordova. I receive this message in terminal when I execute the command cordova build android
Error: An error occurred while listing Android targets
I work on ubuntu 13.10
I was able to successfully build the project with the following steps:
npm install -g cordova ionic
git clone https://github.com/driftyco/ionic-weather/
cd ionic-weather
cordova platform add android
cordova build android
You may be missing the required android sdk tools, or they may not have been added to your system path.
Refer to this question
cordova ubuntu: An error occurred while listing Android targets
And follow this guide to ensure your environment was setup correctly.

Categories

Resources