Commit 93511f3a by app_dev@sobot.com

发布到mavenCenter平台

parent 5394e0ce
......@@ -31,13 +31,18 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation project(':sobot_pictureframe')
implementation project(':sobot_network')
implementation project(':sobot_utils')
implementation project(':sobot_gson')
// implementation project(':sobot_pictureframe')
// implementation project(':sobot_network')
// implementation project(':sobot_utils')
// implementation project(':sobot_gson')
implementation 'com.sobot.library:gson:0.1'
implementation 'com.sobot.library:net:0.1'
implementation 'com.sobot.library:picture:0.1'
implementation 'com.sobot.library:utils:0.1'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.sobot.chat:sobotsupport-glidev4:2.1'
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
implementation 'com.sobot.library:gson:0.1'
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......
File added
......@@ -11,5 +11,8 @@ android {
}
dependencies {
compileOnly 'com.squareup.okhttp3:okhttp:3.12.0'
}
\ No newline at end of file
}
//添加发布到mavenCentral脚本
apply from: 'sobot-gson-publish-mavencentral.gradle'
\ No newline at end of file
apply plugin: 'maven-publish'
apply plugin: 'signing'
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.source
exclude "**/R.class"
exclude "**/BuildConfig.class"
}
ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'gson' //项目名
PUBLISH_VERSION = '1.0' //版本号
}
ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.secretKeyRingFile"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
println "Found secret props file, loading props"
Properties p = new Properties()
p.load(new FileInputStream(secretPropsFile))
p.each { name, value ->
ext[name] = value
}
} else {
println "No props file, loading env vars"
}
publishing {
publications {
release(MavenPublication) {
// The coordinates of the library, being set from variables that
// we'll set up in a moment
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
// Two artifacts, the `aar` and the sources
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact androidSourcesJar
// Self-explanatory metadata for the most part
pom {
name = PUBLISH_ARTIFACT_ID
description = 'sobot gson '
// If your project has a dedicated site, use its URL here
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev'
licenses {
license {
//协议类型,一般默认Apache License2.0的话不用改:
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'app_dev@sobot.com'
name = 'zhichi'
email = 'app_dev@sobot.com'
}
}
// Version control info, if you're using GitHub, follow the format as seen here
scm {
//修改成你的Git地址:
connection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
developerConnection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
//分支地址:
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev/master'
}
// A slightly hacky fix so that your POM will include any transitive dependencies
// that your library builds upon
// withXml {
// def dependenciesNode = asNode().appendNode('dependencies')
//
// project.configurations.implementation.allDependencies.each {
// def dependencyNode = dependenciesNode.appendNode('dependency')
// dependencyNode.appendNode('groupId', it.group)
// dependencyNode.appendNode('artifactId', it.name)
// dependencyNode.appendNode('version', it.version)
// }
// }
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//跳过“unspecified”的依赖项
//避免出现问题:
//Execution failed for task ':sample:checkDebugAarMetadata'.
//> Could not resolve all files for configuration ':sample:debugRuntimeClasspath'.
// > Could not find :unspecified:.
// Required by:
project.configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
repositories {
// The repository to publish to, Sonatype/MavenCentral
maven {
// This is an arbitrary name, you may also use "mavencentral" or
// any other name that's descriptive for you
//项目名称
name = "gson"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
// You only need this if you want to publish snapshots, otherwise just set the URL
// to the release repo directly
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
// The username and password we've fetched earlier
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
sign publishing.publications
}
\ No newline at end of file
......@@ -12,4 +12,7 @@ android {
dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
compileOnly 'com.squareup.okhttp3:okhttp:3.12.0'
}
\ No newline at end of file
}
//添加发布到mavenCentral脚本
apply from: './sobot-network-publish-mavencentral.gradle'
\ No newline at end of file
apply plugin: 'maven-publish'
apply plugin: 'signing'
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.source
exclude "**/R.class"
exclude "**/BuildConfig.class"
}
ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'net' //项目名
PUBLISH_VERSION = '1.0' //版本号
}
ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.secretKeyRingFile"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
println "Found secret props file, loading props"
Properties p = new Properties()
p.load(new FileInputStream(secretPropsFile))
p.each { name, value ->
ext[name] = value
}
} else {
println "No props file, loading env vars"
}
publishing {
publications {
release(MavenPublication) {
// The coordinates of the library, being set from variables that
// we'll set up in a moment
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
// Two artifacts, the `aar` and the sources
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact androidSourcesJar
// Self-explanatory metadata for the most part
pom {
name = PUBLISH_ARTIFACT_ID
description = 'sobot net'
// If your project has a dedicated site, use its URL here
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev'
licenses {
license {
//协议类型,一般默认Apache License2.0的话不用改:
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'app_dev@sobot.com'
name = 'zhichi'
email = 'app_dev@sobot.com'
}
}
// Version control info, if you're using GitHub, follow the format as seen here
scm {
//修改成你的Git地址:
connection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
developerConnection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
//分支地址:
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev/master'
}
// A slightly hacky fix so that your POM will include any transitive dependencies
// that your library builds upon
// withXml {
// def dependenciesNode = asNode().appendNode('dependencies')
//
// project.configurations.implementation.allDependencies.each {
// def dependencyNode = dependenciesNode.appendNode('dependency')
// dependencyNode.appendNode('groupId', it.group)
// dependencyNode.appendNode('artifactId', it.name)
// dependencyNode.appendNode('version', it.version)
// }
// }
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//跳过“unspecified”的依赖项
//避免出现问题:
//Execution failed for task ':sample:checkDebugAarMetadata'.
//> Could not resolve all files for configuration ':sample:debugRuntimeClasspath'.
// > Could not find :unspecified:.
// Required by:
project.configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
repositories {
// The repository to publish to, Sonatype/MavenCentral
maven {
// This is an arbitrary name, you may also use "mavencentral" or
// any other name that's descriptive for you
//项目名称
name = "net"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
// You only need this if you want to publish snapshots, otherwise just set the URL
// to the release repo directly
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
// The username and password we've fetched earlier
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
sign publishing.publications
}
\ No newline at end of file
......@@ -19,4 +19,7 @@ dependencies {
//如果主项目中使用的是glide,那么需要在加上
//api 'com.sobot.chat:sobotsupport-glidev4:2.0'
}
\ No newline at end of file
}
//添加发布到mavenCentral脚本
apply from: './sobot-picture-publish-mavencentral.gradle'
\ No newline at end of file
apply plugin: 'maven-publish'
apply plugin: 'signing'
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.source
exclude "**/R.class"
exclude "**/BuildConfig.class"
}
ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'picture' //项目名
PUBLISH_VERSION = '1.0' //版本号
}
ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.secretKeyRingFile"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
println "Found secret props file, loading props"
Properties p = new Properties()
p.load(new FileInputStream(secretPropsFile))
p.each { name, value ->
ext[name] = value
}
} else {
println "No props file, loading env vars"
}
publishing {
publications {
release(MavenPublication) {
// The coordinates of the library, being set from variables that
// we'll set up in a moment
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
// Two artifacts, the `aar` and the sources
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact androidSourcesJar
// Self-explanatory metadata for the most part
pom {
name = PUBLISH_ARTIFACT_ID
description = 'sobot picture'
// If your project has a dedicated site, use its URL here
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev'
licenses {
license {
//协议类型,一般默认Apache License2.0的话不用改:
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'app_dev@sobot.com'
name = 'zhichi'
email = 'app_dev@sobot.com'
}
}
// Version control info, if you're using GitHub, follow the format as seen here
scm {
//修改成你的Git地址:
connection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
developerConnection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
//分支地址:
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev/master'
}
// A slightly hacky fix so that your POM will include any transitive dependencies
// that your library builds upon
// withXml {
// def dependenciesNode = asNode().appendNode('dependencies')
//
// project.configurations.implementation.allDependencies.each {
// def dependencyNode = dependenciesNode.appendNode('dependency')
// dependencyNode.appendNode('groupId', it.group)
// dependencyNode.appendNode('artifactId', it.name)
// dependencyNode.appendNode('version', it.version)
// }
// }
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//跳过“unspecified”的依赖项
//避免出现问题:
//Execution failed for task ':sample:checkDebugAarMetadata'.
//> Could not resolve all files for configuration ':sample:debugRuntimeClasspath'.
// > Could not find :unspecified:.
// Required by:
project.configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
repositories {
// The repository to publish to, Sonatype/MavenCentral
maven {
// This is an arbitrary name, you may also use "mavencentral" or
// any other name that's descriptive for you
//项目名称
name = "picture"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
// You only need this if you want to publish snapshots, otherwise just set the URL
// to the release repo directly
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
// The username and password we've fetched earlier
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
sign publishing.publications
}
\ No newline at end of file
......@@ -10,4 +10,7 @@ android {
}
}
\ No newline at end of file
}
//添加发布到mavenCentral脚本
apply from: './sobot-picture-publish-mavencentral.gradle'
\ No newline at end of file
apply plugin: 'maven-publish'
apply plugin: 'signing'
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.source
exclude "**/R.class"
exclude "**/BuildConfig.class"
}
ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'utils' //项目名
PUBLISH_VERSION = '1.0' //版本号
}
ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.secretKeyRingFile"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
println "Found secret props file, loading props"
Properties p = new Properties()
p.load(new FileInputStream(secretPropsFile))
p.each { name, value ->
ext[name] = value
}
} else {
println "No props file, loading env vars"
}
publishing {
publications {
release(MavenPublication) {
// The coordinates of the library, being set from variables that
// we'll set up in a moment
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
// Two artifacts, the `aar` and the sources
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact androidSourcesJar
// Self-explanatory metadata for the most part
pom {
name = PUBLISH_ARTIFACT_ID
description = 'sobot utils'
// If your project has a dedicated site, use its URL here
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev'
licenses {
license {
//协议类型,一般默认Apache License2.0的话不用改:
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'app_dev@sobot.com'
name = 'zhichi'
email = 'app_dev@sobot.com'
}
}
// Version control info, if you're using GitHub, follow the format as seen here
scm {
//修改成你的Git地址:
connection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
developerConnection = 'git@code.zhichidata.com:sobot_android/Sobot_module_Dev.git'
//分支地址:
url = 'http://code.zhichidata.com/sobot_android/Sobot_module_Dev/master'
}
// A slightly hacky fix so that your POM will include any transitive dependencies
// that your library builds upon
// withXml {
// def dependenciesNode = asNode().appendNode('dependencies')
//
// project.configurations.implementation.allDependencies.each {
// def dependencyNode = dependenciesNode.appendNode('dependency')
// dependencyNode.appendNode('groupId', it.group)
// dependencyNode.appendNode('artifactId', it.name)
// dependencyNode.appendNode('version', it.version)
// }
// }
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//跳过“unspecified”的依赖项
//避免出现问题:
//Execution failed for task ':sample:checkDebugAarMetadata'.
//> Could not resolve all files for configuration ':sample:debugRuntimeClasspath'.
// > Could not find :unspecified:.
// Required by:
project.configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
repositories {
// The repository to publish to, Sonatype/MavenCentral
maven {
// This is an arbitrary name, you may also use "mavencentral" or
// any other name that's descriptive for you
//项目名称
name = "utils"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
// You only need this if you want to publish snapshots, otherwise just set the URL
// to the release repo directly
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
// The username and password we've fetched earlier
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
sign publishing.publications
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment