Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
0a248022
Commit
0a248022
authored
Feb 21, 2019
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine plugin sign and upload
parent
d7759781
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
137 deletions
+47
-137
build.gradle
build.gradle
+1
-0
plugin/build.gradle
plugin/build.gradle
+24
-4
plugin/gradle-mvn-push.gradle
plugin/gradle-mvn-push.gradle
+0
-133
plugin/gradle.properties
plugin/gradle.properties
+22
-0
No files found.
build.gradle
View file @
0a248022
...
...
@@ -26,6 +26,7 @@ buildscript {
}
dependencies
{
classpath
'com.vanniktech:gradle-maven-publish-plugin:0.8.0'
classpath
'com.android.tools.build:gradle:3.3.1'
classpath
'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath
'com.google.gms:google-services:4.2.0'
...
...
plugin/build.gradle
View file @
0a248022
apply
plugin:
'com.android.library'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'com.vanniktech.maven.publish'
apply
from:
'gradle-mvn-push.gradle'
@SuppressWarnings
(
"GroovyUnusedDeclaration"
)
def
getRepositoryUsername
()
{
return
hasProperty
(
'NEXUS_USERNAME'
)
?
NEXUS_USERNAME
:
""
}
@SuppressWarnings
(
"GroovyUnusedDeclaration"
)
def
getRepositoryPassword
()
{
return
hasProperty
(
'NEXUS_PASSWORD'
)
?
NEXUS_PASSWORD
:
""
}
android
{
buildToolsVersion
rootProject
.
buildToolsVersion
...
...
@@ -11,10 +20,10 @@ android {
defaultConfig
{
minSdkVersion
rootProject
.
minSdkVersion
targetSdkVersion
rootProject
.
sdkVersion
versionCode
9
versionName
"1.2.0"
versionCode
Integer
.
parseInt
(
VERSION_CODE
)
versionName
VERSION_NAME
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test
getRepositoryPassword()
.runner.AndroidJUnitRunner"
}
buildTypes
{
...
...
@@ -28,6 +37,17 @@ androidExtensions {
experimental
=
true
}
mavenPublish
{
targets
{
uploadArchives
{
releaseRepositoryUrl
=
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
snapshotRepositoryUrl
=
"https://oss.sonatype.org/content/repositories/snapshots/"
repositoryUsername
=
getRepositoryUsername
()
repositoryPassword
=
getRepositoryPassword
()
}
}
}
dependencies
{
api
"androidx.core:core-ktx:1.0.1"
api
"com.google.android.material:material:1.1.0-alpha03"
...
...
plugin/gradle-mvn-push.gradle
deleted
100644 → 0
View file @
d7759781
/*
* Copyright 2013 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply
plugin:
'maven'
apply
plugin:
'signing'
@SuppressWarnings
([
"GroovyUnusedDeclaration"
,
"GrMethodMayBeStatic"
])
def
isReleaseBuild
()
{
return
!
android
.
defaultConfig
.
versionName
.
contains
(
"SNAPSHOT"
)
}
@SuppressWarnings
(
"GroovyUnusedDeclaration"
)
def
getReleaseRepositoryUrl
()
{
return
hasProperty
(
'RELEASE_REPOSITORY_URL'
)
?
RELEASE_REPOSITORY_URL
:
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
@SuppressWarnings
(
"GroovyUnusedDeclaration"
)
def
getSnapshotRepositoryUrl
()
{
return
hasProperty
(
'SNAPSHOT_REPOSITORY_URL'
)
?
SNAPSHOT_REPOSITORY_URL
:
"https://oss.sonatype.org/content/repositories/snapshots/"
}
@SuppressWarnings
(
"GroovyUnusedDeclaration"
)
def
getRepositoryUsername
()
{
return
hasProperty
(
'NEXUS_USERNAME'
)
?
NEXUS_USERNAME
:
""
}
@SuppressWarnings
(
"GroovyUnusedDeclaration"
)
def
getRepositoryPassword
()
{
return
hasProperty
(
'NEXUS_PASSWORD'
)
?
NEXUS_PASSWORD
:
""
}
afterEvaluate
{
project
->
uploadArchives
{
repositories
{
mavenDeployer
{
beforeDeployment
{
MavenDeployment
deployment
->
signing
.
signPom
(
deployment
)
}
pom
.
groupId
=
'com.github.shadowsocks'
pom
.
artifactId
=
'plugin'
pom
.
version
=
android
.
defaultConfig
.
versionName
repository
(
url:
getReleaseRepositoryUrl
())
{
authentication
(
userName:
getRepositoryUsername
(),
password:
getRepositoryPassword
())
}
snapshotRepository
(
url:
getSnapshotRepositoryUrl
())
{
authentication
(
userName:
getRepositoryUsername
(),
password:
getRepositoryPassword
())
}
pom
.
project
{
name
'Shadowsocks Plugin'
packaging
'aar'
description
'Shadowsocks Plugin'
url
'https://github.com/shadowsocks/shadowsocks-android'
scm
{
url
'https://github.com/shadowsocks/shadowsocks-android.git'
connection
'scm:git:git://github.com/shadowsocks/shadowsocks-android.git'
developerConnection
'scm:git:git@github.com:shadowsocks/shadowsocks-android.git'
}
licenses
{
license
{
name
'GPLv3'
url
'https://www.gnu.org/licenses/gpl-3.0.html'
distribution
'repo'
}
}
developers
{
developer
{
id
'madeye'
name
'Max Lv'
url
'https://github.com/madeye'
}
developer
{
id
'Mygod'
name
'Mygod Studio'
url
'https://github.com/Mygod'
}
}
}
}
}
}
signing
{
required
{
isReleaseBuild
()
&&
gradle
.
taskGraph
.
hasTask
(
"uploadArchives"
)
}
sign
configurations
.
archives
}
android
.
libraryVariants
.
all
{
variant
->
def
javadocTask
=
task
(
"generate${variant.name.capitalize()}Javadoc"
,
type:
Javadoc
)
{
description
"Generates Javadoc for $variant.name."
source
=
android
.
sourceSets
.
main
.
java
.
srcDirs
classpath
+=
project
.
files
(
android
.
getBootClasspath
().
join
(
File
.
pathSeparator
))
exclude
'**/*.kt'
exclude
'**/BuildConfig.java'
exclude
'**/R.java'
}
def
jarJavadocTask
=
task
(
"jar${variant.name.capitalize()}Javadoc"
,
type:
Jar
)
{
description
"Generate Javadoc Jar for $variant.name"
classifier
=
'javadoc'
from
javadocTask
.
destinationDir
}
jarJavadocTask
.
dependsOn
javadocTask
artifacts
.
add
(
'archives'
,
jarJavadocTask
)
def
jarSourceTask
=
task
(
"jar${variant.name.capitalize()}Sources"
,
type:
Jar
)
{
description
"Generates Java Sources for $variant.name."
classifier
=
'sources'
from
android
.
sourceSets
.
main
.
java
.
srcDirs
}
artifacts
.
add
(
'archives'
,
jarSourceTask
)
}
}
plugin/gradle.properties
0 → 100644
View file @
0a248022
GROUP
=
com.github.shadowsocks
VERSION_NAME
=
1.2.0
VERSION_CODE
=
9
POM_ARTIFACT_ID
=
plugin
POM_NAME
=
Shadowsocks Plugin
POM_PACKAGING
=
aar
POM_DESCRIPTION
=
SIP003 plugin for Shadowsocks
POM_INCEPTION_YEAR
=
2018
POM_URL
=
https://github.com/shadowsocks/shadowsocks-android
POM_SCM_URL
=
https://github.com/shadowsocks/shadowsocks-android
POM_SCM_CONNECTION
=
scm:git:git://github.com/shadowsocks/shadowsocks-android.git
POM_SCM_DEV_CONNECTION
=
scm:git:ssh://git@github.com/shadowsocks/shadowsocks-android.git
POM_LICENCE_NAME
=
The GNU General Public License v3.0
POM_LICENCE_URL
=
https://www.gnu.org/licenses/gpl-3.0.html
POM_LICENCE_DIST
=
repo
POM_DEVELOPER_ID
=
Mygod
POM_DEVELOPER_NAME
=
Mygod Studio
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