-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
// If you want to publish your sources as well | ||
task androidSourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
from android.sourceSets.main.java.srcDirs | ||
from android.sourceSets.main.kotlin.srcDirs | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
} | ||
|
||
group = GROUP_ID | ||
version = VERSION | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
|
||
groupId GROUP_ID | ||
artifactId ARTIFACT_ID | ||
version VERSION | ||
|
||
from components.release | ||
artifact androidSourcesJar | ||
|
||
pom { | ||
name = ARTIFACT_ID | ||
description = 'Android ViewBinding extension to provide simpler usage in Activity, Fragment and ViewHolder.' | ||
url = SITE_URL | ||
licenses { | ||
// Your licensing information | ||
license { | ||
name = 'The Apache Software License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'Jintin' | ||
name = 'Tim Lin' | ||
email = '[email protected]' | ||
} | ||
// More developers if any... | ||
} | ||
|
||
scm { | ||
connection = GIT_URL | ||
developerConnection = GIT_URL | ||
url = SITE_URL | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
System.getenv("OSS_SIGNING_KEY"), | ||
System.getenv("OSS_SIGNING_PASSWORD"), | ||
) | ||
sign publishing.publications | ||
} |