importing library project + different projects into Android Studio from Eclipse - eclipse

Looks like the time has come for me to start using Android Studio, as I need some features that unfortunately have not been ported to Eclipse :(
Fortunately Android Studio is able to nearly-flawlessly import my projects, although I'm concerned if I'm doing it correctly
My Eclipse Workspace Layout is as follows:
LIB-CODEBASE is a big library project that contains most of the application beef
APP-KINDLE is a runnable project that uses the former, and provides some additional classes and activities for the KINDLE version of the app
APP-FIRETV is the same, but targeted to Amazon FireTV devices
APP-GOOGLE is the same, but targeted to Google-Play certified devices
APP-GCAST is the same, but targeted to modern devices supporting Chromecast.
When I import into Android Studio any of the APP-XXXX projects, it creates a copy of LIB-CODEBASE inside. So for each APP-XXXX project I have a full copy of LIB-CODEBASE inside their folders.
Is there an easy way to make all APP-XXXX projects to just share, link or include the LIB-CODEBASE project?

Inside a project you can refer an external module.
Just use:
Project
|__build.gradle
|__settings.gradle
|__app (application module)
|__build.gradle
In settings.gradle:
include ':app'
include ':codeBaseLib'
project(':codeBaseLib').projectDir=new File('pathLibrary')
In app/build.gradle:
dependencies {
compile project(':codeBaseLib')
}
Pay attention to codeBaseLib.
You have to use the path of the library inside the other project, not the root of the project.
Also for your APP-XXXX projects check if you can use a single project with different flavors.

Related

How to add a new flutter project as a IntelliJ module in a larger project

I have a single INTELLIJ project, with 4 java modules and 4 python modules, each is also pretty much a separate sub-project in gradle. Now, in an isolated module in the same project I want a flutter app.
Eventually I might want to make custom gradle tasks to run flutter as a subproject so that I can build all from gradle but that is way down the road. Right now I'm trying to get the intelliJ flutter plugin to work with the flutter project as a module (instead of the base folder, one level down, app/flutterApp/[Anything Flutter Needs]).
The dream is to have these 9 projects in the same folder, master project, git and build pipeline as a single set without losing functionality... if it can happen without touching android studio even better.
Instructions (So far):
File - new - module, then select flutter.
Add the module in project structure so it's inline with the others (use dot notation to signify module groups/folders).
Add "Dart SDK", "Dart Packages" and "Flutter Plugins" Dependencies in the said tab of the module.
Set the flutter sdk location (File - Settings - Languages - Flutter)
RUN main.dart: This allows the flutter plugin to recognize it; sadly after figuring the rest out, this is what thwarted the effort.

Windows.Devices.Bluetooth.dll

For my Unity-UWP project, I want to interact with iBeacons.
I wanted to add the library to my project, but I can't seem to locate it.
What do I have to do, in order to use it with my Unity project?
You need to compile a dll separately that interacts with Windows.Devices.Bluetooth.dll then include the dll in the in your project under the Assets/Plugins/WSA folder to add it as a plugin. Once you do that you can reference the DLL like you would in any normal .NET project as if you added a reference to the dll.
There are some other requirements beyond that (For example you also need to make a 2nd version of the plugin compiled with the full .NET framework with the same type names and version number to be used in-editor), see the unity documentation "Windows Store Apps: Plugins on .NET Scripting Backend" for the full details.

Import multi module project in Eclipse

I am trying to get started with Eclipse SCADA and import the projects from their git repository.
I have cloned the following projects:
org.eclipse.scada.external
org.eclipse.scada.utils
org.eclipse.scada.base
org.eclipse.scada.protocols
org.eclipse.scada.core
org.eclipse.scada.releng
For each project I did mvn verify in the parent folder and imported the projects in Eclipse. I also changed target platform. However, I still seem to have problems with their dependencies.
Any help would really be appreciated.
Actually the Eclipse SCADA java projects are not developed with "Maven first". So you should disregard maven completely while in the IDE. The maven build is basically only used to build the project unattended.
The issue with the target platform is more complex. We were a bit sloppy in providing a always working target platform (and it is actually difficult to keep them up to date, since the versions of the bundles are fix).
I made a target platform file for the current version, you can find it here: https://gist.github.com/CptMauli/ec6eda37734f0108510f
To make it work properly please download a classic eclipse put it somewhere and create an environment variable ECLIPSE_432_HOME which points to it. Alternatively you can just change the first entry in the target file and point it directly to it.
The reason behind it is, if you would use your own eclipse installation, it is possible that bundles installed there conflict with bundles provided in the target platform or from your workspace. This is actually mostly not even a problem when compiling, but as soon as you start a client or a server, Eclipse will complain about duplicated bundles.
If you have any more questions please go to our mailing list: https://dev.eclipse.org/mailman/listinfo/scada-dev
or our google group: https://groups.google.com/forum/#!forum/openscada
or write to me directly at juergen dot rose at ibh-systems dot com

How to define an OSGI/Eclipse plugin with binary components for multiple platforms

I created an Eclipse plugin and there is a native binary needed to support its functionality. I have the native code ready for Win and Mac. The invocation of the native code is different for each platform, so there is also some plugin code related to the native code. (In fact the native code is JNA code, so very different indeed.) Currently I have an extension point and each native support plugin contributes there. So, as soon as a native support is here, the main plugin works. Also I have a test fragment for each of the native support plugins to unit test functionality.
How should I set the plugin(s) up, so that everybody get's the right plugin when downloading from update site or p2 repo? (I noticed that for example SWT uses fragments for the native code, so is this the way to go?)
Edit: After converting the plugins to fragments as indicated by the answer, what should I do with the unit test fragments of these plugins? Fragments of fragments are not possible.
How can I set this up in Tycho, so that Tycho build runs the test suitable for the current platform and ignores the other platform.
Edit: I have Mac and Windows native code, two fragments and therefore two environments in the pom. But then Tycho complains "plugin x cannot be installed in this environment because its filter is not applicable", of course not, only one of Win/Mac can be active at any certain time. Can Tycho figure out this itself or do I need os dependant Maven profiles?
Yes, you will need to package the native bundles into plug-in fragments. Each fragment should specify the platform filter to ensure only one fragment is valid per platform. For example on Windows 64 bit you need to specify os=win32, ws=win32 arch=x86_64.
If your fragments are part of a feature, you should also specify the platform filter in the feature definition.
Under Tycho, you need to specify all your supported platform filter combinations under the environments section of target platform configuration in your pom file.
Tycho always runs tests under the current platform. Add your fragments to your test runtime - see here on adding dependencies to the tycho test runtime. Tycho often needs help in identifying fragments to add to the test runtime.

Not able to add Omnigroup framework for rtf editor in a my iPad application

I have been trying to add omnigroup framework for editing rtf files into my local iPad application. But always I am getting the errors like OmniBase/OmniBase.h, OmniFoundation/OmniFoundation.h files are not found.
I tried with different combinations of settings in the build settings of project target. But did not work. I am using Xcode version 4.2.1,
Mac OS X : 10.7 and IOS 5 Lion OS.
There's actually a lot of Xcode configuration involved in using the Omni frameworks. I recently went through the learning process myself and wrote a lengthy tutorial. My tutorial is centered around using OUIEditableFrame but it should be a good starting point for whatever part of the framework you're looking to use.
In a nutshell:
Make sure you're including Omni's Configuration directory in your project.
Add the required frameworks by adding the appropriate .xcodeproj files from Omni to your project. Many frameworks are dependent on other so all dependencies will need to be added.
Add required libraries to the Link Binary with Libraries section of the Build Phases tab.
Add required libraries to the Target Dependencies section of the Build Phases tab.
Edit your Schema. Select Build and add the required libraries.