当前位置:网站首页>Androd releases jitpack open source project (gradle7.2)
Androd releases jitpack open source project (gradle7.2)
2022-07-25 04:50:00 【Mo Yi trace】
Record a release JitPack The whole process of dependency Library .
AndroidStudo edition :2021.1.1 Patch3
1. Create project
Project name customization , Here for WLibrary
2. establish Library
2.1 Create the name as WUtils Of Android Library


2.2 Dependency created library
open File ==>ProjectsStructure, Pay attention to the box label

3. Configuration items
3.1 Project root new jitpack.yml
before_install:
- sdk install java 11.0.10-open
- sdk use java 11.0.10-open
jdk:
- openjdk11

3.2WUtils Modular build.gradle Add the following check code

complete build.gradle
plugins {
id 'com.android.library'
id 'maven-publish'
}
android {
compileSdk 31
defaultConfig {
minSdk 22
targetSdk 31
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
// Dependent Library Group id
groupId = 'com.moyihen.w-library'
// Fill in at will when publishing a single component , When there are multiple components, this component artifactId
artifactId = 'w-library'
}
}
}
}
4. Submit code to github
4.1 verification git Whether to install
Make sure... Is installed git, Not installed Download from the official website , open File =>Settings=>Version Control=>Git, spot Test The test can correctly find the installation path , The version number appears as normal .
4.2 Click on GitHub Log in to your github account number
The following is the normal login status .
4.3 Submission code
The first submission will create a warehouse by default . Click on Git=>Share Project on GitHub =>share=>Add

Upload successful , The blue font below the dot will jump github Upload address .
5 Create a release
5.1 Click on tags,



5.2 Click on the bottom Publish release

5.3 Release complete ,

6 relation JitPack
Enter your project warehouse address , My is https://github.com/moyihen/WLibrary, Click on Look up => Click on Get it , In this way, the association release is successful . Sliding down depends How to use the library .

7 Test whether the dependent library is successfully published .
grade7.0 Dependence changes .
7.1 Open the project settings.gradle, To configure maven { url ‘https://jitpack.io’ }

7.2 open app=>build.gradle,
To configure implementation ‘com.github.moyihen:WLibrary:v1.0.0’
7.3 The project can normally rely on WLibrary, The calling function is normal

end.
边栏推荐
- Introduction to CpG control network
- Paper:《Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Condi
- # 1. Excel的IF函数
- 自然的状态最好
- Perspective
- Grafana visual configuration diagram histogram
- Open source summer interview | "after 00" PMC member Bai Zeping
- Introduction to computing system hardware (common servers)
- Geely and Daimler set up a joint venture to produce pure electric smart in China!
- C# 之 FileStream类介绍
猜你喜欢

Paper:《Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Condi

Burpsuite爆破之token值替换

Basic knowledge of scratch crawler framework

I didn't expect Mysql to ask these questions

Druid connection pool - strong self-study from 0. Those who don't understand Druid can click in. If you know not to click in, you will think I'm wordy

Zhongchuang computing power won the recognition of "2022 technology-based small and medium-sized enterprises"

Introduction to computing system hardware (common servers)

Cannot make qopenglcontext current in a different thread: the solution to pyqt multithread crash

Ffmpeg download and installation

开源之夏专访|“00 后” PMC member 白泽平
随机推荐
[cloud picture theory] 247 first introduction to Huawei cloud analysis service
Novel capture practice
Actual combat | record an attack and defense drill management
When developing or debugging the IP direct scheme, it should be noted that the host value should be consistent with the direct IP
Mit.js: small event publishing and subscription library
Paper:《Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Condi
MySQL 中RDS 链接数突然上涨怎么查?
Completed project series Tutorials - smart campus management system
C# 之 FileStream类介绍
MongoDB的安全认证详解
Summary of UPR optimization suggestions of unity
二、MySQL数据库基础
Sudden! Britain accuses Huawei of major defects in its equipment (with report)
Gbase 8A about no suitable driver
LVGL 8.2 Message box
5年经验的大厂测试/开发程序员,怎样突破技术瓶颈?大厂通病......
When the development of the meta universe begins to show more and more the style of the Internet, we need to be vigilant
LVGL 8.2 Slider
How to test data in the process of data warehouse migration?
Wechat official account all article download links to get