examples for controling gradle via java api? - java

I'm looking to integrate Multi-OS engine with my scala libgdx app.
Currently, I have scala-libgdx set up (from https://github.com/charafau/scala-libgdx.g8), but it's missing the iOS part due to discontinuation of robovm.
Of course, there's sbt-moe(https://github.com/HevyLight/sbt-moe), but the author has not yet answered my email for help understanding its usage.
Anyway, back to the point: is there a way to 'control' gradle via some java interface? If so, are there any examples running around?
ps: I'm thinking about controlling gradle from sbt

Related

Can we integrate DOORS tool as a plugin to a java application?

I would like to integrate the DOORS tool(requirement gathering tool) into my java application.
My application is a standalone application built in java, Can I integrate DOORS tool as a plugin or any other way into my java application.
Domorans project DriveDOORS might be an approach for you. See https://github.com/domoran/DriveDOORS.
Generally, there is no other official way to communicate with DOORS other than starting DXL scripts and getting the results from these scripts, so for every solution you implement you will have to have a DOORS client installed that you communicate with.
Update: I stand corrected: you should be able to use OSLC, see https://www.ibm.com/developerworks/rational/library/oslc-services-rational-doors/index.html
MDconnect by Sodius was a 3rd party tool that helped here, but it seems to be discontinued. But you could ask sodius at https://www.sodiuswillert.com whether they still support it.
Also, with DOORS 9.2 there was a C API that might be usable with java as well, but this also seems to be discontinued, I could not find a later version than this:
http://download.boulder.ibm.com/ibmdl/pub/software/rationalsdp/documentation/product_doc/DOORS/version_9-1/doors_api_manual.pdf
Hope this helps
Mike

Running Java on Flutter Web/Desktop

I was looking for a way to possibly use a java library of my own inside of my Flutter App.
I did some research but was only able to find information about how to integrate flutter with native Java libraries on Android exclusively.
Is there a way to call on java code also from Flutter Web and/or Flutter Desktop?
I am sorry I can't provide further information to this question as I was not able to find any "lead" if not starflut (https://pub.dev/packages/starflut) - which to the 'beginner' programmer I am in Flutter might seem an overkill approach to this problem - and I'm not even sure it supports Flutter Web/Desktop as of yet.
Any help, comments or ideas would be highly appreciated
EDIT 1
As implementing Java on Flutter Web seems close to impossible (or not worth the hassle), would calling C++ libraries from Flutter Web be a possibility?
EDIT 2
To better describe my problem/situation, I'll add some context.
I need to write a library that can be accessed by multiple flutter apps (both Web and possibly Mobile, but PWA would also be ok), but also by multiple programs which don't use the flutter framework.
I considered a couple of options, but I am still quite inexperienced and I am not sure which way to go forward with:
C++ as the core of the library, and making language bindings to Dart
It seems C++ code can work on mobile, but I haven't found a way it can be run on Web as well as within Flutter
JavaScript as the core of the library, and
either accessing the library directly from Flutter Web (seems to be possible https://medium.com/flutter-community/using-javascript-code-in-flutter-web-903de54a2000 )
Though I am not sure if this solution would work also on Mobile Flutter
Using Dart itself as the core of the library
this would be the quickest option when rolling out the Flutter App(s), but it would also have the drawback that I'll need to rewrite the library in another language later on
Calling c++ from flutter web is not possible. You can, however implement whatever functionality you want in the server-side using whatever language you want and expose the functionality to flutter using whatever web API you desire. You can follow the same approach with Java, and it doesn't have to be just web. The requirement though is that whatever you're implementing has to reside on the "server" which the system can run freely. Your flutter app just "connects" to it and sends and receives messages

Can I use Ruby or Python library in Android Java application?

Let's say I want to write a poker app for Android.
It is fine to use APIs in Java. But when it comes to heavy usage of arrays, sets, combinations etc Java becomes a huge pain for me. It's much easier to code poker AI in Ruby/Python IMHO.
So the question: is there a way to use either Ruby or Python functions in Java Android Application? It should be packed in .apk of course.
UPDATE: Regarding Ruboto: As I understand from this link https://play.google.com/store/apps/details?id=org.ruboto.core&feature=more_from_developer#?t=W251bGwsMSwxLDEwMiwib3JnLnJ1Ym90by5jb3JlIl0. ruboto-core needs to be installed on device to run ruboto apps =( It's no good if I'm going to share my app on Google Play.
How about JRuby? It's an open-source implementation of Ruby on top of Java that lets you use the JDK libraries. You could embed a JRuby instance into your app and run your logic using that.
Also see Jython
Have you tried Ruboto?
It claims to run Ruby scripts in Android devices!
There's this that might help you though, scripting Layer for Android SL4A found here, Though am not sure exactly how you'd integrate it with Android SDK :)
Actually, on reading the wiki, in the FAQ and quote:
Can I use SL4A to write a real Android application or embed SL4A
scripts in my application? Yes! You can embed your script in a
(mostly) stand alone APK.
Here is python-for-android, which let you include a python distribution in your android application, the distribution could include module you want to use.

RESTful application on Google App Engine Java?

I would like to create a RESTful app on Google App Engine. I would like to provide XML and JSON services. I have briefly experimented with Restlet, Resteasy, and Jersey. I haven't had much success with any of them, other than some simple examples in Restlet.
Could you share your experiences creating a Restful web application on Google App Engine using Java or provide any insight on the aforementioned toolkits on GAE?
Thanks!
Edit (2009-07-25):
I have decided to use Restlet for the time being. It seems to work flawlessly so far. Please post any other insights/opinions you may have. What problems have you encountered? Have you successfully used Jersey/Restlet/Resteasy on GAE/J? If so, we want to hear about it!
I'm happy to report that Restlet M3 works FLAWLESSLY on AppEngine 1.2.2. I have followed the "First steps" and "First resource" tutorials found http://restlet.com/technical-resources/restlet-framework/guide.
So, it seems to me that Restlet is the answer for your GAE/J Restful applications.
I'm using Jersey on GAE. Here is the link for those who are interested about setting it up: (I'm using GAE SDK v1.4.0):
http://tugdualgrall.blogspot.com/2010/02/create-and-deploy-jax-rs-rest-service.html
I am going to begin exploring this as well, but haven't started yet. I did find this framework, that says it should work, but like I said haven't tried it yet.
http://wiki.restlet.org/docs_1.2/13-restlet/275-restlet/252-restlet.html
If you get it working, or manage to get one of the above suggestions working, update everyone as I am sure there is interest in this.
I'm using Restlet together with Guice on Google AppEngine. IMHO they fit together very well. See my recent blog post for further details: http://haraldpehl.blogspot.com/2009/11/google-appengine-restlet.html
Since these valiant older solutions were patched together, Google has apparently supplied an Eclipse plugin to create a starter project that produces an App Engine app, an Android APK, and a Web app, all talking to one another over an interface defined by a single set of annotated object declarations.
Haven't tried this yet myself, but do have a look before trying any of the more heterogeneous examples described in the earlier messages above:
https://developers.google.com/eclipse/docs/appengine_connected_android
This Google video is also quite informative:
http://www.youtube.com/watch?v=NU_wNR_UUn4
For what it's worth, there has been quite a bit of discussion on Jersey user lists wrt how to make Jersey work on GAE. It is bit tedious work due to GAE restrictions (missing classes from white lists -- hopefully resolved over time), but apparently can be made to work.
So while not trivially easy, that might be your best bet; esp. since many of the problems faced are the same for all frameworks (imposed by GAE).
Well, I would highly advice you to have a look at play framework
Have a look at the video on the homepage
It has a gae module
With siena as a orm to handle gae datastore
From all the java frameworks I've seen so far, I think it has the easier learning curve,
great documentation,
a tutorial to develop a complete application
very active and helpfull community,
free as in beer and also as in speech
highly scalable due to it's stateless out of the box design
rest friendly
highly customizable via it's modules and plugin approach
more over, taking into account it's for a college course, it's really easy to hack into the code, I could handle a couple of tickets and new features without any experience at all with java, just a couple of year developing web applications with php
other benefits
it's really easy to start, no complicated setup involved, just download and unzip the file and your are ready
great development experience, just fix the code and hit refresh, play autocompiles changes on the fly when running on development mode
fast and lightweight
fullstack, you don't have to integrate cumbersome frameworks to make it work
great errors report, no more endless error stack trace, just shows you the line with error
no xml configuration anywhere around
great support for tdd with selenium integrated test
I think the main advantage as a learning tool, is that it's possible to peek into the source code without feeling lost and the community support... The documentation is very clear, and you can learn a lot by just having a look at the source code...
I recently put together a project template with Jersey, Guice and AppEngine at GitHub. It has been developed with SimpleDS, but it can be modified to work with Objectify / JDO easily. The project is live here.
It should be a good starting point for new projects.
Here is a very very good tutorial Restlet/Android/GAE/Objectify with an example of a simple application. Sorry it's in french, but you can juste copy/paste the code, or use google traduction.
I followed it and had a working Android / GAE server communicating together in a 2 hours. It's a good base to start or test Restlet.
http://www.tutos-android.com/webservice-rest-android-appengine-restlet-objectify
Good Luck
The 2 most cumbersome GAE REST API actions to make work, whether Java or .py, are graphics and how to undisplay private information. My little gae rest feed forked another project. I'm sure Java succeeds where python stuck due to the Java takes and gives more ways (advantages) as well as longer (slower) time to succeed (disadvantage) while python projects opens less ways to succeed (disadvantageous) and less development time (advantageous rapid development) to succeed the same.

How to make a Java PlugIn?

I need to make my Java program as a PlugIn to OME - an Image processing web based s/w having Java API
www.openmicroscopy
OmeroJava is the appropriate API for the latest version of OME (OMERO 4.2), if you are writing a client. If you would like to embed your code inside of Insight (the OMERO Java client), then you should start with How to write a client. Other links to OME-Java libraries are for a legacy version and should not be used.
Looks like the Open Microscopy Java API is worth investigation. If it's not, it's worth highlighting in your question as to why it's not suitable (marked as legacy?)

Categories

Resources