Has anyone done Stripe Integration using Kotlin? It would be great to see some documentation about the project structure and HTTP requests!
Main problem: I am unable to find the gradle dependency for Kotlin. Does something like that even exist?
*Note: I am not using Kotlin for Android so please don't try to answer with this link.
Kotlin inter-op with Java is almost perfect. For most companies it doesn't make sense to build an adapter layer which somehow make it easier to work with their product using Kotlin. There is really no need for it.
There is no specific library for Kotlin, just keep using Stripe-Java, you'll be fine.
If compatibility issues arise, you'll most likely be able to handle them by yourself, maybe by writing a (very) small portion of your codebase in Java, but that's a remote possibility.
And remember the GitHub issue tracker is there for a reason.
Related
I'm working on a small REST application server and I'm trying to be able to save a Java bean using DataNucleus JDO with MySQL.
My only problem is that I can't find any examples of any application that uses DataNucleus JDO and is built using Gradle.
I'm new to using Java and I have essentially no idea how to go about doing this. At this moment I'm just considering going with Hibernate JPA instead but I feel like JDO would be better for me in the long run. I would really appreciate any help pointing me in the right direction.
I followed Adrian's solution I found here with a minor edit: I modified the task to depend on processResources instead of compileJava and made classes depend on datanucleusEnhance, otherwise it didn't work for me.
I would normally tell you the error I got but I couldn't see the enhancer's error output.
The solution essentially calls an ant task to enhance the classes instead of using Gradle only. It's not the most elegant but it worked.
I am currently trying to write an Elasticsearch plugin (mainly for testing purposes), and I am struggling with the documentation which simply states:
These examples provide the bare bones needed to get started. For more information about how to write a plugin, we recommend looking at the plugins listed in this documentation for inspiration.
So basically, after finding a few tutorials (which kind of disagree with each other besides the maven part), see http://david.pilato.fr/blog/2016/07/27/creating-a-plugin-for-elasticsearch-5-dot-0-using-maven/ and http://jfarrell.github.io (they don't inherit the same classes).
I am actually stuck where to start, what components are available from the core elasticsearch dependency, and how should I load my plugin. (I know I can look into it by testing and retro engineering, I just wondered if anyone had good tips regarding the topic).
For now my code just looks like:
public class MyPlugin extends Plugin implements NativeScriptFactory{
//overriden methods
}
Where should I go from there?
Thank you very much!
#asttouf
I recently wrote a plugin to EL 2.3.x (https://github.com/betorcs/elastic-recurring-plugin). It was hard to find a documentation saying steps to follow to write it. I needed to google at lot to find some references.
I'm listing some projects I used as reference, i hope they can help you.
https://github.com/elastic/elasticsearch/tree/master/plugins/ingest-attachment
https://github.com/elastic/elasticsearch-mapper-attachments
https://www.elastic.co/blog/found-writing-a-plugin
http://www.flax.co.uk/blog/2016/01/27/fun-frustration-writing-plugin-elasticsearch-ontology-indexing/
EDITED
More references:
https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-scripting-native.html
https://www.elastic.co/blog/writing-your-own-ingest-processor-for-elasticsearch
Plugin updated to support ES 5.0, check out https://github.com/betorcs/elastic-recurring-plugin/tree/5.0
I'm creating some rules to SonarQube where it will analyze a Android Project and raise some Security vulnerabilityes points on code.
I've already created a custom rule by Sonar Tutorial to create my own rules following the same structure, but I had some complications. For instance, when I tryed to run the test classes, I've found some problems to identify Android Classes and validate my rule, and after some research, I solved the problem, but seems like when I put my plugin on SonarQube and run it, the problem remains with the tool not identifying Android Classes (I coudn't comprove this because coudn't find a way to debug the web tool and see why the Rule is not checking).
By this, I need to know if I'm really doing this of the right way. Analyze with custom rules a Android Project directly by SonarQube can be done just following the Sonar Tutorial? Do I need of custom configurations inside my template or any other step to do it?
If beyond the answer or the instruction, someone could provide some documentation to help me, I would be deeply grateful.
Since now, thanks for your attention!
I just finished my Full version on my app. I am now looking around trying to figure out how to make my Lite version of the app. Not a whole lot is different but there are differences especially when you are playing the trivia game. How do I go about managing both of these versions in Eclipse? I looked at this guide:
http://blog.donnfelker.com/2010/08/05/howto-android-full-and-lite-versions/
But it seems like the linked tutorial is outdated based on the comments below the tutorial about adding Proguard to the code. There has to be an easy way to do this. Is the best way still to make 3 projects like the above linked tutorial says but just find away to get around the Proguard issue?
Not sure if this counts as an answer but I have positive experiences from using library projects when creating dual version Apps like free/pro, lite/paid or whatever you choose to call them.
You can separate the differences in logic either by using simple if-statements, like if(AppType.isFree(context)) where in the helper method you check if the context package is that of the free or paid version.
Or by using inheritance and interfaces to take advantage of polymorphism and dynamic binding.
For example the menu activity in your lib might invoke a getGameActivity, which depending on sub class (free or paid) returns the appropriate version of the game and where most of the logic is in the abstract lib GameActivity class.
And about ProGuard, if you are not very afraid of reverse engineering, it's not really necessary to bother with it.
I am new to Android development. I'm working on an project which involves using stubs for web services. When I try to use it, I get the following error:
I've been stuck here for a week, so some help would be highly appreciated.
It seems that there is some packaging or deployment issues with the included libraries that you use in you project. This error is thrown when the Java Virtual Machine or a ClassLoader instace try to load the definition of the a class but cannot find it anywhere. In most cases, this occurs when something is messed up in your project configurations but i cannot tell what from the information provided. A solution would be to configure your project from the scratch since most of the times this is easier than finding what causes the problem. Also in case you had an older version of ADT (<17) the answer of this SO question might be usefull. Finally, if you are importing any javax libararies(or libraries that have javax components in them), this maybe the source of your problem since Adroid does not support the javax library.