Services » History » Revision 6
Revision 5 (Alexey Demakov, 02/04/2016 10:23 PM) → Revision 6/9 (Alexey Demakov, 08/08/2018 04:54 PM)
h1. Services * "Jenkins Continuous Integration Server":https://forge.ispras.ru/jenkins/ Server":http://forge.ispras.ru:8080 - internal access only * "Sonarube quality management platform, dedicated to continuously analyzing and measuring the technical quality of source code":http://forge.ispras.ru:9000 - internal access only *build.gradle:* <pre> plugins { id 'org.sonarqube' ''org.sonarqube'' version '1.0' ''1.0'' } sonarqube { properties { property 'sonar.host.url', 'http://forge.ispras.ru:9000' ''sonar.host.url'', ''http://forge.ispras.ru:9000'' property 'sonar.jdbc.url', 'jdbc:mysql://localhost:3306/sonar' ''sonar.jdbc.url'', ''jdbc:mysql://localhost:3306/sonar'' property 'sonar.jdbc.driverClassName', 'com.mysql.jdbc.Driver' ''sonar.jdbc.driverClassName'', ''com.mysql.jdbc.Driver'' property 'sonar.jdbc.username', 'sonar' ''sonar.jdbc.username'', ''sonar'' property 'sonar.jdbc.password', 'sonar' ''sonar.jdbc.password'', ''sonar'' } } </pre> * "Nexus Repository manager":http://forge.ispras.ru:8082/nexus/ - internal access only Mail <demakov@ispras.ru> is you need upload permissions. *build.gradle:* <pre> plugins { id 'net.saliman.properties' ''net.saliman.properties'' version '1.4.4' ''1.4.4'' id 'net.researchgate.release' ''net.researchgate.release'' version '2.3.5' ''2.3.5'' } apply plugin: 'maven-publish' ''maven-publish'' repositories { maven { url 'http://forge.ispras.ru:8082/nexus/content/repositories/snapshots' ''http://forge.ispras.ru:8082/nexus/content/repositories/snapshots'' } maven { url 'http://forge.ispras.ru:8082/nexus/content/repositories/releases' ''http://forge.ispras.ru:8082/nexus/content/repositories/releases'' } jcenter() } project.group = projectGroup release { failOnCommitNeeded = false versionPatterns = [ // Increments build number: "0.2.5-alpha-150428" => "0.2.6-alpha-150428" /(^\d+\.\d+\.)(\d+)(-[^-]*)(-[^-]*$)/: { Matcher m, Project p -> m.replaceAll("${ m[0][1] }${ (m[0][2] as int) + 1 }${ m[0][3] }" ) } ] } String getCurrentDateString() { new SimpleDateFormat( 'yyMMdd' ''yyMMdd'' ).format( new Date() ) } task unSnapshotVersion.doLast { def version = project.version.toString() version += '-' ''-'' + getCurrentDateString() project.plugins.getPlugin( net.researchgate.release.ReleasePlugin.class ) .updateVersionProperty( version ) } def repoUrlStr = 'http://forge.ispras.ru:8082/nexus/content/repositories/' ''http://forge.ispras.ru:8082/nexus/content/repositories/'' def repoUserStr = hasProperty('repoUser') hasProperty(''repoUser'') ? repoUser : '' '''' def repoPasswordStr = hasProperty('repoPassword') hasProperty(''repoPassword'') ? repoPassword : '' '''' publishing { publications { maven(MavenPublication) { groupId projectGroup artifactId projectName version project.version from components.java } } repositories { maven { if(project.version.endsWith('-SNAPSHOT')) if(project.version.endsWith(''-SNAPSHOT'')) { url repoUrlStr + 'snapshots' ''snapshots'' } else { url repoUrlStr + 'releases' ''releases'' } credentials { username repoUserStr password repoPasswordStr } authentication { basic(BasicAuthentication) } } } } afterReleaseBuild.dependsOn publish </pre> *gradle.properties:* <pre> projectGroup=... projectName=.. # gradle-release-plugin restriction: use only '=' ''='' as separator version=... </pre> *gradle-local.properties:* <pre>repoUser=... repoPassword=... </pre> *.gitignore:* <pre> gradle-local.properties </pre> *settings.gradle:* <pre> rootProject.name = projectName </pre>