8000 GitHub - Artear/app_lib_injector_android
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Artear/app_lib_injector_android

Repository files navigation

Injector

Injector Library

  • This is a beta library used to generate some little useful classes in for Artear projects, particularly for WebWrapper. Maybe you can catch any idea or simplely add extra functionality for your application.

Documentation

This library has two modules and export two different .jar and generate independent docs on the same folder.

On the one hand injector-api only has the annotations classes to process. On the other the injector-compiler use the injector-api to generate the files across the annotation processor. Both use the same gradle for publication and distribution.

The start point is ArtearProcessor. This process all classes of your project that use JsInterface creating one extra file for each one. The result is a useful way to control all javascript event in your WebView. Each event has an object associated and a unique responsibility.

For a friendship way to generate code use a Process and the idea to encapsulate each annotation for process them. Create a model class like JsInterfaceClass and use this in a process to generate each object to help you for the creation of file.

That object is a kotlin poet object, like FunSpec, TypeSpec. This library is a very good Kotlin API for generating .kt source files.

See entire documentation library here.

Implementation

lastVersion = 0.0.6

Gradle:

implementation "com.artear.injector:injector-api:$lastVersion"
kapt "com.artear.injector:injector-compiler:$lastVersion"

License

Copyright 2019 Artear S.A.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0