Enable development repository for artifacts

Uploading dev builds to 4Benj Repo via Jenkins for plugin developers.
This commit is contained in:
Magix 2022-06-22 11:08:55 -04:00 committed by GitHub
commit ed7ffa74da
3 changed files with 31 additions and 14 deletions

View File

@ -116,7 +116,7 @@ jar {
from { from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} }
duplicatesStrategy = DuplicatesStrategy.INCLUDE duplicatesStrategy = DuplicatesStrategy.INCLUDE
from('src/main/java') { from('src/main/java') {
@ -171,13 +171,23 @@ publishing {
} }
repositories { repositories {
maven { maven {
// change URLs to point to your repos, e.g. http://my.org/repo if(version.endsWith('-dev')) {
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/' println ("Publishing to 4benj-maven")
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' url 'https://repo.4benj.com/releases'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl name '4benj-maven'
credentials {
username System.getenv('benj_maven_username')
password System.getenv('benj_maven_token')
}
} else {
println ("Publishing to sonatype")
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
name = 'sonatype' name = 'sonatype'
credentials(PasswordCredentials) credentials(PasswordCredentials)
}
} }
} }
} }
@ -225,7 +235,9 @@ eclipse {
} }
signing { signing {
sign publishing.publications.mavenJava if(!version.endsWith('-dev')) {
sign publishing.publications.mavenJava
}
} }
javadoc { javadoc {

View File

@ -16,18 +16,18 @@ public interface ExternalAuthenticator {
/** /**
* Called when an external account creation request is made. * Called when an external account creation request is made.
* @param request The authentication request. * @param request The authentication request.
* *
* For developers: Use {@link AuthenticationRequest#getRequest()} to get the request body. * For developers: Use AuthenticationRequest#getRequest() to get the request body.
* Use {@link AuthenticationRequest#getResponse()} to get the response body. * Use AuthenticationRequest#getResponse() to get the response body.
*/ */
void handleAccountCreation(AuthenticationRequest request); void handleAccountCreation(AuthenticationRequest request);
/** /**
* Called when an external password reset request is made. * Called when an external password reset request is made.
* @param request The authentication request. * @param request The authentication request.
* *
* For developers: Use {@link AuthenticationRequest#getRequest()} to get the request body. * For developers: Use AuthenticationRequest#getRequest() to get the request body.
* Use {@link AuthenticationRequest#getResponse()} to get the response body. * Use AuthenticationRequest#getResponse() to get the response body.
*/ */
void handlePasswordReset(AuthenticationRequest request); void handlePasswordReset(AuthenticationRequest request);
} }

View File

@ -171,6 +171,11 @@ public final class PluginManager {
.toList().forEach(handler -> this.invokeHandler(event, handler)); .toList().forEach(handler -> this.invokeHandler(event, handler));
} }
/**
* Gets a plugin's instance by its name.
* @param name The name of the plugin.
* @return Either null, or the plugin's instance.
*/
public Plugin getPlugin(String name) { public Plugin getPlugin(String name) {
return this.plugins.get(name); return this.plugins.get(name);
} }