How can I improve/make changes to the orginal Gluon Charm Down Services and use it in my app?

被刻印的时光 ゝ 提交于 2019-12-13 02:49:16

问题


I am using Gluon Mobile so that I can use javafx to build applications to iOS and Android. I wonder how I can change/improve on the existing Charm Down library of services that are available: http://gluonhq.com/products/mobile/charm-down/

In my case specifically I need to take images that cover the whole screen on mobile. How can images taking up the whole screen be taken on Android and iPhone? And so I am looking to make edits to the VideoService and the PicturesService. By altering and building onto these existing services I hope to avoid alot of work that has already been done.

How can I edit existing services in Charm Down and use it in my app?


回答1:


If you check the Charm Down repository overview, you will find the required instructions for building your own version.

These are the requisites in case you want to fork Gluon Charm Down and build your local version:

  • A recent version of JDK 8
  • Gradle 2.2 or superior.

To build the Android Services:

  • Android SDK: the android SDK must be downloaded. The required Android platform is android-25.

  • ANDROID_HOME has to be defined as an environment variable, typically by adding it as a gradle property to ~/.gradle/gradle.properties.

  • Extras/Android Support Repository and Extras/Google Repository that can be installed with the Android SDK Manager.

To build the iOS Services:

  • A Mac with with MacOS X 10.11.5 or superior
  • XCode 8.x or superior

Once you have the above requisites, clone the repository from here:

hg clone https://bitbucket.org/gluon-oss/charm-down

(You might need to sign in in Bitbucket).

Open the project with your IDE.

Before modifying any of the services try to build it, install it and use them in your project.

To build the Charm Down services, on the project's root, run on command line:

./gradlew clean build

If you want to install them, run:

./gradlew clean install

When the process finishes successfully, the different services are installed in your local .m2 maven repository.

All these required jars can be added to a Gluon Mobile project by including mavenLocal() in the list of repositories and the snapshot version (currently 3.7.0-SNAPSHOT, but this could be changed as well):

repositories {
    mavenLocal()
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

jfxmobile {
    downConfig {
        version = '3.7.0-SNAPSHOT'
        plugins 'display', 'lifecycle', 'pictures', 'statusbar', 'storage'
    }
}

Tip: there are too many services that you don't want to modify, so you can comment out some of them from the settings.gradle file, mainly to reduce the building time.

Once everything is settled properly, you can start modifying the source code as you need. Anytime you want to check your changes, just run ./gradlew install and then deploy and run your project.



来源:https://stackoverflow.com/questions/47998446/how-can-i-improve-make-changes-to-the-orginal-gluon-charm-down-services-and-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!