I am new to flutter multiplatform (web and mobile).
I have the default spotbugs-SAST setup in gitlab CI for a flutter multiplatform project, and it fails because it does not like the Flutter-specific Android configurations. So, it wants me to include local.properties which has the default references (absolute paths) to the flutter sdk (flutter.sdk) and android sdk (sdk.dir).
What is the best practice for running spotbugs-SAST for a multiplatform flutter project?
Related
I am working on flutter application, and i want that application to load and run natively on android studio without flutter sdk separately so that i can put some dependencies of native kotlin or java there and run natively from there.
I copied the android folder from flutter project and create a new native android application from it
enter image description here
I have also faced the same issue , after researching the internet I got to know that there are one way to include our flutter project to android as module and than you can use Flutter.createView to load your flutter widget. It is simple as that, you can also follow this blog for step by step instrucation
https://medium.com/flutter-community/add-flutter-to-existing-android-ios-app-ae8c4fb1582e
You can just open android folder in Android Studio and ios folder in Xcode. Flutter tools will generate needed modules for Android Studio project and CocoaPods for iOS project. You can also run and debug your app using native debuggers (Java/C/Objective-C/Swift) from these IDEs.
Then you can easily add dependencies by changing build.gradle of your android application. I think it's a bit more complicated with ios.
I believe the new version of TFS won't offer native support for Android and iOS (unless the code is in C++), but in what ways could that be worked around?
Let's say I have a mobile client that has a version for every platform - Android, Windows Phone, iOS. The way I make a new build for Windows Phone is: open Visual Studio, find the right build definition and queue a new build, and then the build commences on a build agent and the output is copied to the folder that's specified in the build definition.
Is it possible to have that procedure for the iOS and Android apps as well? Currently, the procedure is using a Hudson build server, but I'd like to have build definitions for iOS and Android and just queue new builds through Visual Studio and receive the output .ipa and .apk files in the folder specified in the definition.
Thanks in advance for any suggestions.
On-premise TFS supports cross-platform build since TFS 2015, in the new tasks based build system. Check Continuous integration on any platform.
To build an Android app, use Gradle task: https://www.visualstudio.com/en-us/docs/build/steps/build/gradle
To build Xcode project, use Xcode build task: https://www.visualstudio.com/en-us/docs/build/apps/mobile/xcode-ios
In addition, TFS 2017 has some default build definition you can use directly: https://www.visualstudio.com/en-us/docs/build/define/build
Things i have done via MobileFirst CLI
Create a sampleProject.
Added Android Environment.
Build and deployed the MobileFirst Project.
Now i have the Android-->Native (Folder)
Now how i use this Folder to create my native android App.
i want to build via CMD line.
Edit: if what you're asking is "how to generate the APK for my hybrid application from command line?", then this is not related to MFP.
For a Hybrid application, MFP generates the native folder for you. You then need to use Android tools such as Android Studio or the Android ADT command line to further work with the Android project.
See here: Building and Running from the command line / from Android Studio.
Note that Google's documentation assumes your project supports Gradle, which MFP projects (7.0 and below) do not support at this time. You should probably use the Eclipse ADT UI or Android Studio (do not select to upgrade the project with Gradle support) rather than command line.
These instructions are older (so no mention of Gradle), you can try those.
http://codeseekah.com/2012/02/09/command-line-android-development-basics/
That does not look like a native Android component generated by MFP. It looks like a Hybrid application with the Android environment. Not the same.
To create a native Android component (= the MFP SDK for Native Android applications), you need to generate the NativeAPI and associated artifacts that you then need to copy over into your own, separately created by you (using Android ADT or Android Studio), native Android project.
You can do this using the following set of CLI commands (or via the MFP Studio):
mfp create MyProject
cd MyProject
mfp add api MyAndroidFramework -e android
Read more here: Using CLI to create, build, and manage MobileFirst project artifacts
I have developed a hybrid app for android using PhoneGap in Windows environment.
This is what i did:
I added android platform after creating a cordova project and then imported it into eclipse and built it and tested it on my android phone.
Now i want to use the same code and build it for iOS using PhoneGap Build service. I can arrange an apple developer certificate but before that i want to make sure whether it is possible to build the existing project for iOS.
Can anyone suggest on this please?
for people looking for an answer to this here, is what i did :
Adobe build only requires a URL of git repo of the project. Once you have got it you can build it for any mobile platforms iOS, Android, Windows, and Blackberry.
we have successfully created a decent phonegap application working on android and iphone. (using eclipse android dev environment and running phonegap cloud build)
But I have integrated a Github plugin which was specific to Android "Sharing Plugin" .For that I had included Share.java file and other javascript file. But how will I integrate ios share plugin in same codebase (eclipse project) or I will have to Copy entire code on Mac machine use xCode Dev environment and use the plugin that way I will end up making two builds (only HTML, JS ,CSS common) and I will be using two Builds on Adobe Cloud Build service.
IS there any way to keep a single Source base for iOS and Android for even plugins? (put .m .h files of ios plugin in same eclipse codebase and use adobe phonegap build and use the plugin)
If you are planning on using PhoneGap Build service, they only support a limited set of plugins. You will not be able to import this plugin with PhoneGap build.
If you switch to building locally, this will invariably split your code into two projects (one for Android and one for iOS). You can create symlinks and keep www assets in a single location, but native code will be split (including your plugins).