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
- Search URL that takes in a search query parameter.
- URL that is required to fetch the novel details.
- 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.
- Open up extension
xyz.com
.
Lets assume you want to add the new source - First go to the folder window for the project.
xyz
since that is the host name.
Step 3: Now we will start with copying one of the folders and renaming the below files/contents to - Change the folder name to
xyz
.
- 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
.
- Also rename the contents in the
Xyz.kt
as below.
Step 4: Open Android Studio.
Goto settings.gradle
file and add this entry.
include ':extensions:individual:en:xyz'
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.