Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Building .jar plugin
Started by Maciej Czekala Jan 18 2018 11:02 PM

8 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Maciej Czekala

[GLOBAL: userInfoPane.html]
Maciej Czekala
  • Enthusiast

  • 39 posts
  • Corona SDK

Hi,

 

I have a problem with building .jar file for my plugin via corona native.

 

In manual it says that plugin will build automatically when project is build, build.gradle indicated the same but I don't get jar file but instead I get plugin\build\outputs\aar\plugin-release.aar. 

 

There is no directory for jar.

 

How to build plugin in jar version so I can submit it to marketplace?



[TOPIC: post.html]
#2

Maciej Czekala

[GLOBAL: userInfoPane.html]
Maciej Czekala
  • Enthusiast

  • 39 posts
  • Corona SDK

Anyone?



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,147 posts
  • Corona SDK

Let me see if I can get an engineer to respond to this.

 

Rob



[TOPIC: post.html]
#4

Kirill Toporkov

[GLOBAL: userInfoPane.html]
Kirill Toporkov
  • Observer

  • 8 posts
  • Corona Staff

Hi!
 
According to my experience to build jar you need to run "Clean" then the sequence of gradle tasks: build -> exportPluginJar, then the result jar file will be placed to '/plugin/build/outputs/jar/<plugin_name>.jar'. Also there is another way to get your jar: you can find classes.jar in '/plugin/build/intermediates/bundles/release/' and then rename it to proper plugin name (that is what 'exportPluginJar' task does).
 

Kirill



[TOPIC: post.html]
#5

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

I am having the same issue. No Jar is built and there is no bundles/release folder.

 

On plugin build.gradle (Corona 2018.3233) it is trying to get the classes.jar from "$buildDir/intermediates/bundles/default/". but that  "default" folder also does not exist.

 

Can someone confirm that Jar plugin building is really working?



[TOPIC: post.html]
#6

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

Ok. I think I found the issue.

 

The classes.jar is being saved at "android/plugin/build/intermediates/intermediate-jars/release" (or "android/plugin/build/intermediates/intermediate-jars/debug"), and the gradle script, as I mentioned earlier, is trying to get the classes.jar ".../intermediates/bundles/default/", so it is not finding it and therefore we don't see it on the "build/outputs/jar/".



[TOPIC: post.html]
#7

nandgate

[GLOBAL: userInfoPane.html]
nandgate
  • Enthusiast

  • 78 posts
  • Corona SDK

Thought I'd bump this topic up.  Has this bug been logged? While not a huge deal, it'd be nice for the default project to work as expected out of the box.



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,147 posts
  • Corona SDK

Let me see if I can get an update.

 

Rob



[TOPIC: post.html]
#9

bjoern

[GLOBAL: userInfoPane.html]
bjoern
  • Enthusiast

  • 75 posts
  • Corona SDK

Any news on this?

Is using the classes.jar file from "android/plugin/build/intermediates/intermediate-jars/release" the correct way?

 

Best regards!




[topic_controls]
[/topic_controls]