Android——Modify GT library source code

The GT library is completely open source. If you feel uncomfortable in the middle of the process or feel that there is a need for improvement, you can contact the blogger, or directly rely on the GT library to get started and modify it. The notes in it are very detailed.

Directly depend on the remote library, please click here

Let's take a look at how to rely on the source code of the GT library, which can be directly modified

Step 1: Download the GT library source code

First open the GT details page:

https://github.com/1079374315/GT https://github.com/1079374315/GT Click the GT library source code link inside

Download directly after coming to the source code page 

Step 2: Copy the GT library source code to your own project 

After downloading, pull out the gt and gt-DataBinding folders in the compressed package, and copy them to your own project

Step 3: Add the two modules gt and gt-DataBinding

Open the settings.gradle file, add it at the end, and then click Sync Now in the upper right corner

//添加GT库2个模块 gt  与 gt-DataBinding
include ':gt'
include ':gt-DataBinding'

After the synchronization is complete, you can see the source code of our GT library

The fourth step (the last step): rely on GT library source code

Open the build.gradle file, add it in dependencies {}, and click Sync Now in the upper right corner

//依赖 GT库
    implementation project(':gt')
    implementation project(':gt-DataBinding')//注册本地库 gt-DataBinding
    annotationProcessor project(':gt-DataBinding')

 After synchronization, there is no problem. At this time, you can happily use the source code of the GT library directly, and you can directly click into the source code to modify it, but you need to modify it carefully.

Thank you very much for your attention to the GT library

 Follow the blogger's latest release library: GitHub - 1079374315/GT

Guess you like

Origin blog.csdn.net/qq_39799899/article/details/127358406