Skip to content

Commit

Permalink
publish on Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
H07000223 committed Sep 30, 2021
1 parent 5f8af23 commit 528fcff
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 137 deletions.
4 changes: 4 additions & 0 deletions CHNAGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,8 @@ Version 2.1.2 *(2017.1.23)*
----------------------------
* update compileSdkVersion to 25, buildToolsVersion to "25.0.2"

Version 3.0.0 *(2021.09.30)*
----------------------------
* AndroidX & publish on Maven Central


114 changes: 20 additions & 94 deletions FlycoTabLayout_Lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
apply plugin: 'com.android.library'
//apply plugin: 'com.github.dcendents.android-maven'
//apply plugin: 'com.jfrog.bintray'

// 这个version是区分library版本的,因此当我们需要更新library时记得修改这个version
version = "2.1.2"
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
// versionCode rootProject.ext.versionCode
// versionName rootProject.ext.versionName
versionCode 212
versionName version
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
}

buildTypes {
Expand All @@ -37,89 +31,21 @@ dependencies {
implementation support.design
}

//def siteUrl = 'https://github.com/H07000223' // 项目的主页
//def gitUrl = 'https://github.com/H07000223' // Git仓库的url
//group = "com.flyco.tablayout" // Maven Group ID for the artifact,一般填你唯一的包名
//install {
// repositories.mavenInstaller {
// // This generates POM.xml with proper parameters
// pom {
// project {
// packaging 'aar'
// // Add your description here
// name 'Android TabLayout Library' //项目描述
// url siteUrl
// // Set your license
// licenses {
// license {
// name 'MIT'
// url 'http://opensource.org/licenses/MIT'
// }
// }
// developers {
// developer {
// id 'H07000223' //填写的一些基本信息
// name 'H07000223'
// email '[email protected]'
// }
// }
// scm {
// connection gitUrl
// developerConnection gitUrl
// url siteUrl
// }
// }
// }
// }
//}
//
//task sourcesJar(type: Jar) {
// from android.sourceSets.main.java.srcDirs
// classifier = 'sources'
//}
//
//artifacts {
// archives sourcesJar
//}
//
//android.libraryVariants.all { variant ->
// println variant.javaCompile.classpath.files
// if (variant.name == 'release') { //我们只需 release 的 javadoc
// task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
// // title = ''
// // description = ''
// source = variant.javaCompile.source
// classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())
// options {
// encoding "utf-8"
// links "http://docs.oracle.com/javase/7/docs/api/"
// linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference"
// }
// exclude '**/BuildConfig.java'
// exclude '**/R.java'
// }
// task("javadoc${variant.name.capitalize()}Jar", type: Jar, dependsOn: "generate${variant.name.capitalize()}Javadoc") {
// classifier = 'javadoc'
// from tasks.getByName("generate${variant.name.capitalize()}Javadoc").destinationDir
// }
// artifacts {
// archives tasks.getByName("javadoc${variant.name.capitalize()}Jar")
// }
// }
//}
//
//Properties properties = new Properties()
//properties.load(project.rootProject.file('local.properties').newDataInputStream())
//bintray {
// user = properties.getProperty("bintray.user")
// key = properties.getProperty("bintray.apikey")
// configurations = ['archives']
// pkg {
// repo = "maven"
// name = "FlycoTabLayout_Lib" //发布到JCenter上的项目名字
// websiteUrl = siteUrl
// vcsUrl = gitUrl
// licenses = ["MIT"]
// publish = true
// }
//}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
}
}

allprojects {
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}
}

apply plugin: "com.vanniktech.maven.publish"
28 changes: 8 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,34 +39,22 @@ can be used freely with other widgets together.
![](https://github.com/H07000223/FlycoTabLayout/blob/master/preview_3.gif)
>## Change Log
## Change Log
> v2.0.0(2016-03-01)
- remove the dependence of FlycoRoundView
- new added method getIconView and getTitleView
> v2.0.2(2016-04-23)
- remove the dependence of NineOldAnimation(only support 3.0+)
> 3.0.0 (2021-09-30)
- upgrade to AndroidX
- publish on Maven Central
## Gradle
```groovy
dependencies{
compile 'com.android.support:support-v4:23.1.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.flyco.roundview:FlycoRoundView_Lib:1.1.2@aar'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:1.5.0@aar'
}
After v2.0.0
dependencies{
compile 'com.android.support:support-v4:23.1.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.0@aar'
// AndroidX
dependencies {
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
}
After v2.0.2(support 3.0+)
// Old
dependencies{
compile 'com.android.support:support-v4:23.1.1'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
Expand Down
27 changes: 8 additions & 19 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,22 @@
![](https://github.com/H07000223/FlycoTabLayout/blob/master/preview_3.gif)


>## Change Log
## Change Log

> v2.0.0(2016-03-01)
- 删除了对FlycoRoundView库的依赖
- 新增方法getIconView和getTitleView(为了某些情况需要动态更新icon之类的)
> 3.0.0 (2021-09-30)
- 升级到AndroidX
- 发布到Maven

> v2.0.2(2016-04-23)
- 删除了对NineOldAnimation库依赖(仅支持3.0+)

## Gradle

```groovy
dependencies{
compile 'com.android.support:support-v4:23.1.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.flyco.roundview:FlycoRoundView_Lib:1.1.2@aar'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:1.5.0@aar'
}

After v2.0.0(support 2.2+)
dependencies{
compile 'com.android.support:support-v4:23.1.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.0@aar'
// AndroidX
dependencies {
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
}

After v2.0.2(support 3.0+)
// Old
dependencies{
compile 'com.android.support:support-v4:23.1.1'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
Expand Down
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {
implementation support.appcompat
implementation support.v4
implementation support.design
implementation project(':FlycoTabLayout_Lib')

// compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
// implementation project(':FlycoTabLayout_Lib')
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
}
34 changes: 33 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,36 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.useAndroidX=true
android.useAndroidX=true

# com.flyco.tablayout:flycoTabLayout:3.0.0
GROUP=io.github.h07000223
POM_ARTIFACT_ID=flycoTabLayout
VERSION_NAME=3.0.0

POM_NAME=FlycoTabLayout
POM_DESCRIPTION=Android TabLayout Library
POM_INCEPTION_YEAR=2021
POM_URL=https://github.com/H07000223/FlycoTabLayout

POM_LICENSE_NAME=The Apache Software License, Version 2.0
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENSE_DIST=repo

POM_SCM_URL=https://github.com/H07000223/FlycoTabLayout
POM_SCM_CONNECTION=scm:git:git://github.com/H07000223/FlycoTabLayout.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://github.com/H07000223/FlycoTabLayout.git

POM_DEVELOPER_ID=H07000223
POM_DEVELOPER_NAME=H07000223
POM_DEVELOPER_URL=https://github.com/H07000223

# 密钥ID的后8位
signing.keyId=
# 密钥密码
signing.password=
signing.secretKeyRingFile=

# Sonatype账号&密码
mavenCentralUsername=
mavenCentralPassword=

0 comments on commit 528fcff

Please sign in to comment.