/NovelLibrary-Extensions

Extensions for NovelLibrary

Primary LanguageKotlinGNU General Public License v3.0GPL-3.0

NovelLibrary-Extensions

Extensions for NovelLibrary

How to create extensions

Prerequisites

  • Android Studio
  • Kotlin
  • Some basic coding knowledge

Steps to get going:

Step 1: Identify the below URLS / URL Requests

  1. Search URL that takes in a search query parameter.
  2. URL that is required to fetch the novel details.
  3. URL(s) that are required to fetch chapters based on the novel selected from the above search results.

Step 2: Create your own package entry in Android Studio.

  • Make sure you are able to open project in Android Studio and able to build it. If you have successfully built it, then you would see something like this under package explorer.

image

  • Open up extension

image

Lets assume you want to add the new source xyz.com.

  • First go to the folder window for the project.

image+

Step 3: Now we will start with copying one of the folders and renaming the below files/contents to xyz since that is the host name.

  • Change the folder name to xyz.

image

  • Inside the folder, open the build.gradle. Update the values as such.
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

ext {
    extName = 'Xyz'
    pkgNameSuffix = 'en.xyz'
    extClass = '.Xyz'
    extVersionCode = 1
    libVersion = '1.0'
}

apply from: "$rootDir/common.gradle"
  • Rename the below folder and file name to xyz.

image to

image

  • Also rename the contents in the Xyz.kt as below.

image

Step 4: Open Android Studio.

Goto settings.gradle file and add this entry.

include ':extensions:individual:en:xyz'

image

Resync the project and you should have your extension ready to work with.

Now open the Xyz.kt file and start making the changes to make sure you get your data.