Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
Widget
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Android Widget
Widget
Commits
424aa9d3
Commit
424aa9d3
authored
Aug 08, 2019
by
王韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[new] 引入maven
parent
88a3f81b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
2 deletions
+83
-2
build.gradle
build.gradle
+3
-0
gradle.properties
gradle.properties
+10
-0
build.gradle
tools/build.gradle
+2
-1
build.gradle
widgetlib/build.gradle
+68
-1
No files found.
build.gradle
View file @
424aa9d3
...
@@ -19,6 +19,9 @@ allprojects {
...
@@ -19,6 +19,9 @@ allprojects {
repositories
{
repositories
{
google
()
google
()
jcenter
()
jcenter
()
maven
{
url
'https://hub.zmcms.cn/repository/maven-public/'
}
}
}
}
}
...
...
gradle.properties
View file @
424aa9d3
...
@@ -19,3 +19,13 @@ android.useAndroidX=true
...
@@ -19,3 +19,13 @@ android.useAndroidX=true
android.enableJetifier
=
true
android.enableJetifier
=
true
# Kotlin code style for this project: "official" or "obsolete":
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style
=
official
kotlin.code.style
=
official
#-----
GROUP
=
com.qmai.android.sdk
POM_ARTIFACT_ID
=
widget
VERSION_NAME
=
1.1.1
SNAPSHOT_REPOSITORY_URL
=
https://hub.zmcms.cn/repository/maven-snapshots/
RELEASE_REPOSITORY_URL
=
https://hub.zmcms.cn/repository/maven-releases/
PUBLIC_REPOSITORY_URL
=
https://hub.zmcms.cn/repository/maven-public/
NEXUS_USERNAME
=
wangwei
NEXUS_PASSWORD
=
caihong520
\ No newline at end of file
tools/build.gradle
View file @
424aa9d3
apply
plugin:
'com.android.library'
apply
plugin:
'com.android.library'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
android
{
android
{
compileSdkVersion
29
compileSdkVersion
29
...
...
widgetlib/build.gradle
View file @
424aa9d3
apply
plugin:
'com.android.library'
apply
plugin:
'com.android.library'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
android
{
android
{
compileSdkVersion
29
compileSdkVersion
29
...
@@ -40,3 +41,69 @@ dependencies {
...
@@ -40,3 +41,69 @@ dependencies {
repositories
{
repositories
{
mavenCentral
()
mavenCentral
()
}
}
apply
plugin:
'maven'
def
getRepositoryUsername
()
{
return
hasProperty
(
'NEXUS_USERNAME'
)
?
NEXUS_USERNAME
:
""
}
def
getRepositoryPassword
()
{
return
hasProperty
(
'NEXUS_PASSWORD'
)
?
NEXUS_PASSWORD
:
""
}
afterEvaluate
{
project
->
uploadArchives
{
repositories
{
mavenDeployer
{
pom
.
project
{
groupId
=
GROUP
artifactId
=
POM_ARTIFACT_ID
version
=
VERSION_NAME
repositories
{
repository
{
name
=
'artifactory'
url
=
'https://hub.zmcms.cn/repository/maven-public/'
snapshots
{
enabled
=
'false'
updatePolicy
=
'interval:2'
}
releases
{
enabled
=
'true'
updatePolicy
=
'interval:2'
}
}
}
}
repository
(
url:
RELEASE_REPOSITORY_URL
)
{
authentication
(
userName:
getRepositoryUsername
(),
password:
getRepositoryPassword
())
}
snapshotRepository
(
url:
SNAPSHOT_REPOSITORY_URL
)
{
authentication
(
userName:
getRepositoryUsername
(),
password:
getRepositoryPassword
())
}
}
}
}
}
task
androidJavadocs
(
type:
Javadoc
)
{
source
=
android
.
sourceSets
.
main
.
java
.
srcDirs
classpath
+=
project
.
files
(
android
.
getBootClasspath
().
join
(
File
.
pathSeparator
))
failOnError
false
}
task
androidJavadocsJar
(
type:
Jar
,
dependsOn:
androidJavadocs
)
{
classifier
=
'javadoc'
from
androidJavadocs
.
destinationDir
}
task
androidSourcesJar
(
type:
Jar
)
{
classifier
=
'sources'
from
android
.
sourceSets
.
main
.
java
.
sourceFiles
}
artifacts
{
archives
androidSourcesJar
// archives androidJavadocsJar
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment