Skip to content

Commit

Permalink
Merge pull request #13 from StringCare/develop
Browse files Browse the repository at this point in the history
feature: migrated to sonatype repository. v4.2.1
  • Loading branch information
efraespada authored Jun 23, 2021
2 parents 57999cc + 2f77caf commit 903e411
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 40 deletions.
80 changes: 42 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
plugins {
id 'java'
id 'com.jfrog.bintray' version '1.8.5'
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
id "com.github.dcendents.android-maven" version "2.1"
id 'maven-publish'
id 'signing'
}

group 'com.stringcare'
version '4.0.1'

def siteUrl = 'https://github.com/StringCare/KotlinGradlePlugin'
def gitUrl = 'https://github.com/StringCare/KotlinGradlePlugin.git'

sourceCompatibility = 1.8

repositories {
google()
jcenter()
mavenCentral()
}

Expand All @@ -35,51 +31,59 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'StringCareAndroidPlugin'
url siteUrl
// Set your license
group = "io.github.stringcare"
version = "4.2.1"

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

publishing {
publications {
plugin(MavenPublication) {
from components.java
artifactId = "plugin"
pom {
packaging = 'aar'
name = 'StringCareAndroidPlugin'
description = "Stringcare Android library"
url = siteUrl
scm {
connection = gitUrl
developerConnection = gitUrl
url = siteUrl
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'efraespada'
name 'efraespada'
email 'efraespada@gmail.com'
id = 'efraespada'
name = 'efraespada'
email = 'efraespada@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
repositories {
maven {
//def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
// def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = properties["nexusUsername"]
password = properties["nexusPassword"]
}
}
}
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintrayUser")
key = properties.getProperty("bintrayApiKey")
configurations = ['archives']
pkg {
repo = "maven"
name = "StringCareAndroidPlugin"
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
signing {
useGpgCmd()
sign publishing.publications.plugin
}

processResources {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/components/Vars.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package components

internal const val version = "4.0.1"
internal const val version = "4.2.1"
internal const val testProjectName = "KotlinSample"
internal const val defaultMainModule = "app"
internal const val gradleTaskNameDoctor = "stringcarePreview"
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/utils/Helper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fun modifyForTest(directory: String, projectPath: String) {
val current = File(".")
val file = File("$directory${File.separator}$projectPath${File.separator}build.gradle")
val content = file.getContent().replace(
"classpath \"com.stringcare:plugin:\$stringcare_version\"",
"classpath \"io.github.stringcare:plugin:\$stringcare_version\"",
when (getOs()) {
Os.WINDOWS -> "\nclasspath files(\"${current.absolutePath.replace("\\", "\\\\")}${File.separator}${File.separator}build${File.separator}${File.separator}libs${File.separator}${File.separator}plugin-$version.jar\")\n"
Os.OSX -> "\nclasspath files(\"${current.absolutePath}${File.separator}build${File.separator}libs${File.separator}plugin-$version.jar\")\n"
Expand Down

0 comments on commit 903e411

Please sign in to comment.