当前位置:网站首页>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.
边栏推荐
- Tiny-emitter.js: a small event subscription and Publishing Library
- 小说抓取实战
- 暗黑王者|ZEGO 低照度图像增强技术解析
- 二、MySQL数据库基础
- AUTOSAR from getting started to mastering 100 lectures (105) - protection mechanism of AUTOSAR timing for functional safety
- The interviewer asked MySQL transactions, locks and mvcc at one go. I
- 在开发或调试IP直接方案时需要注意Host的值跟直接的IP要一致
- 深入掌握Pod
- Ora-01460: conversion request cannot be implemented or unreasonable
- In the Internet of things market, Bosch sensor has launched a number of new solutions
猜你喜欢

Completed project series Tutorials - smart campus management system
![Introduction to fundamentals of operations research [1]](/img/79/b613bff74a78ad63f202b9e652220d.png)
Introduction to fundamentals of operations research [1]

Salt and ice particles cannot be distinguished
![[analysis of GPIO register (crl/crh) configuration of STM32]](/img/63/a7b262e95f1dc74201ace9d411b46f.png)
[analysis of GPIO register (crl/crh) configuration of STM32]

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

How to ensure data consistency between MySQL and redis?

LVGL 8.2 Span

MCU experiment record

Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises

Paper:《Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Condi
随机推荐
AUTOSAR from getting started to mastering 100 lectures (105) - protection mechanism of AUTOSAR timing for functional safety
在开发或调试IP直接方案时需要注意Host的值跟直接的IP要一致
In the Internet of things market, Bosch sensor has launched a number of new solutions
数据链路层协议 ——— 以太网协议
What causes the wait event of TCP socket (kgas) in oracle?
[wechat applet] label (86/100)
二、MySQL数据库基础
Mit.js: small event publishing and subscription library
Perspective
The United States has launched 337 investigations on a number of Chinese companies: Bubugao is full of lying guns!
Apple airpower was forced to cancel its launch two years after it was launched! Uncover the reason!
Database design process
Network engineering case: integrated network design of CII company
[internship] processing time
Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises
如何取得数据库创建时间?
Interpretation and download of the report | ink Tianlun July database industry report, be prepared for danger in times of safety, and safety first
运筹学基础【一】 之 导论
ESWC 2018 | R-GCN:基于图卷积网络的关系数据建模
SMIC's revenue in 2018 was $3.36 billion, and 14nm technology was mass produced this year