[FIX] Нормальный, конфигурабельный фикс maven-publish.

This commit is contained in:
Zaxar163 2019-08-13 15:31:35 +03:00
parent 3f6eb3156d
commit 24f9c05e14
2 changed files with 10 additions and 11 deletions

View file

@ -37,6 +37,6 @@ public AuthProviderResult auth(String login, String password, String ip) throws
@Override @Override
public void close() { public void close() {
// Do nothing postgreSQLHolder.close();
} }
} }

View file

@ -42,17 +42,16 @@
} }
defaultTasks 'build' defaultTasks 'build'
if (hasProperty('mavenUsername') && hasProperty('mavenPassword') && hasProperty('mavenReleaseRepository') && hasProperty('mavenSnapshotRepository')) {
if (hasProperty('mavenUsername') && hasProperty('mavenPassword')) publishing {
publishing {
repositories { repositories {
maven { maven {
// change URLs to point to your repos, e.g. http://my.org/repo url = version.endsWith('SNAPSHOT') ? getProperty('mavenSnapshotRepository') : getProperty('mavenReleaseRepository')
url = version.endsWith('SNAPSHOT') ? 'https://oss.sonatype.org/content/repositories/snapshots/' : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials { credentials {
username getProperty('mavenUsername') username getProperty('mavenUsername')
password getProperty('mavenPassword') password getProperty('mavenPassword')
} }
} }
} }
}
} }