当前位置:网站首页>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.
边栏推荐
- LVGL 8.2 Roller
- GDT,LDT,GDTR,LDTR
- Gbase JDBC connection database exception
- LVGL 8.2 Textarea
- LVGL Switch & Table
- AUTOSAR from getting started to mastering 100 lectures (105) - protection mechanism of AUTOSAR timing for functional safety
- The strongest JVM in the whole network is coming!
- Best practice cases of data security in the medical industry (desensitization version)
- [sht30 temperature and humidity display based on STM32F103]
- GBase 8a 关于No Suitable Driver 问题
猜你喜欢

Actual combat | record an attack and defense drill management

Swagger simple quick start tutorial

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

Openworm project compilation

Introduction to CpG control network

Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises
![[literature notes] pointmlp](/img/8f/654dc6e2f4770b7f12aab49098d3d7.png)
[literature notes] pointmlp

Salt and ice particles cannot be distinguished

Style transfer -- CCPL: contrast coherence preserving loss for versatile style transfer

I didn't expect Mysql to ask these questions
随机推荐
GBase JDBC 连接数据库异常
etcd学习
If the development of the metauniverse still follows the development logic of the Internet, and its end point also follows
[analysis of GPIO register (crl/crh) configuration of STM32]
Detailed explanation of security authentication of mongodb
Sony announced the closure of Beijing mobile phone factory! The production line will be moved to Thailand, and the cost can be reduced by half!
Idea2021 installation
小说抓取实战
LVGL 8.2 Spinbox
Analysis of lottery winning numbers in history
Ora-01460: conversion request cannot be implemented or unreasonable
Dark king | analysis of zego low illumination image enhancement technology
GetData table table data join MySQL method
Etcd learning
MCU experiment record
After watching the latest interview with big manufacturers, these six JVM interview questions were asked
读书的思考
ThreadLocal Kills 11 consecutive questions
Basic knowledge of scratch crawler framework
Actual combat | record an attack and defense drill management