diff --git a/VCL/build.gradle b/VCL/build.gradle index daae85fe..63fb23bb 100644 --- a/VCL/build.gradle +++ b/VCL/build.gradle @@ -14,7 +14,7 @@ android { minSdk 24 targetSdk 33 // versionName "1.21.0" - versionName "1.21.2" + versionName "999.21.0" versionCode 116 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" @@ -148,6 +148,14 @@ afterEvaluate { url = 'https://github.com/velocitycareerlabs/WalletAndroid' } } + signing { + useInMemoryPgpKeys( + rootProject.ext.signingKeyId, + rootProject.ext.signingPrivateKey, + rootProject.ext.signingPassword, + ) + // sign publishing.publications + } } release(MavenPublication) { groupId getGroupId() @@ -192,19 +200,27 @@ afterEvaluate { url = 'https://github.com/velocitycareerlabs/WalletAndroid' } } + signing { + useInMemoryPgpKeys( + rootProject.ext.signingKeyId, + rootProject.ext.signingPrivateKey, + rootProject.ext.signingPassword, + ) + // sign publishing.publications + } } } } } -signing { - useInMemoryPgpKeys( - rootProject.ext.signingKeyId, - rootProject.ext.signingPrivateKey, - rootProject.ext.signingPassword, - ) - sign publishing.publications -} +// signing { +// useInMemoryPgpKeys( +// rootProject.ext.signingKeyId, +// rootProject.ext.signingPrivateKey, +// rootProject.ext.signingPassword, +// ) +// sign publishing.publications +// } repositories { mavenCentral() diff --git a/VCL/build.gradle.bak b/VCL/build.gradle.bak deleted file mode 100644 index e5741d03..00000000 --- a/VCL/build.gradle.bak +++ /dev/null @@ -1,206 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'maven-publish' - id 'signing' -} - -android { - compileSdk 33 -// buildToolsVersion "30.0.3" - namespace 'io.velocitycareerlabs' - - defaultConfig { - minSdk 24 - targetSdk 33 - // versionName "1.21.0" - versionName "99.21.0" - versionCode 116 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - } - - buildTypes { -// def BOOLEAN = "boolean" -// def TRUE = "true" -// def FALSE = "false" - debug { - buildConfigField "String", "VERSION_NAME", "\"${defaultConfig.versionName}\"" - buildConfigField "int", "VERSION_CODE", "${defaultConfig.versionCode}" - -// useProguard false - minifyEnabled false - shrinkResources false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - release { - buildConfigField "String", "VERSION_NAME", "\"${defaultConfig.versionName}\"" - buildConfigField "int", "VERSION_CODE", "${defaultConfig.versionCode}" - -// useProguard true - minifyEnabled false - shrinkResources false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - rc { - buildConfigField "String", "VERSION_NAME", "\"${defaultConfig.versionName}\"" - buildConfigField "int", "VERSION_CODE", "${defaultConfig.versionCode}" - minifyEnabled false - shrinkResources false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - testOptions { - unitTests.includeAndroidResources = true - unitTests.returnDefaultValues = true - } -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -/** - * Publish Android library to GitHub Packages ====================================================== - */ -def getVersionName = { -> - return android.defaultConfig.versionName -} -def getArtifactId = { -> - return "vcl" // Must be lower case! -} -def getGroupId = { -> - return 'io.velocitycareerlabs' -} - -tasks.register('androidSourcesJar', Jar) { - archiveClassifier.set('sources') - if (project.plugins.findPlugin("com.android.library")) { - // For Android libraries - from android.sourceSets.main.java.srcDirs - from android.sourceSets.main.kotlin.srcDirs - } else { - // For pure Kotlin libraries, in case you have them - from sourceSets.main.java.srcDirs - from sourceSets.main.kotlin.srcDirs - } -} - -artifacts { - archives androidSourcesJar -} - -afterEvaluate { - publishing { - publications { - release(MavenPublication) { - groupId getGroupId() - artifactId getArtifactId() - version getVersionName() - - def buildType = android.buildTypes.rc - if (buildType != null) { - def rc = getArtifactId() - def TestartifactId = "${rc}-rc" - println('RELEASE VERSION: ${TestartifactId}') - } else { - println('RELEASE VERSION: ${artifactId}') - } - - // Two artifacts, the `aar` (or `jar`) and the sources - if (project.plugins.findPlugin("com.android.library")) { - from components.release - } else { - from components.java - } - - artifact androidSourcesJar - - // Mostly self-explanatory metadata - pom { - name = getArtifactId() - // Library description - description = 'Velocity Career Labs Android library' - // Library Github URL - url = 'https://github.com/velocitycareerlabs/WalletAndroid' - licenses { - license { - name = 'Apache License 2.0' - // Library license - url = 'https://github.com/velocitycareerlabs/WalletAndroid/blob/dev/VCL/LICENSE' - } - } - developers { - developer { - id = 'velocitycareerlabs' - name = 'Michael Avoyan' - email = 'michael.avoyan@velocitycareerlabs.com' - } - } - - scm { - // Library info on Github - connection = 'scm:github.com/velocitycareerlabs/WalletAndroid.git' - developerConnection = 'scm:git:ssh://github.com/velocitycareerlabs/WalletAndroid.git' - url = 'https://github.com/velocitycareerlabs/WalletAndroid' - } - } - } - } - } -} - -signing { - useInMemoryPgpKeys( - rootProject.ext.signingKeyId, - rootProject.ext.signingPrivateKey, - rootProject.ext.signingPassword, - ) - sign publishing.publications.release -} - -repositories { - mavenCentral() -} -/** - * ================================================================================================= - */ - -dependencies { - implementation 'androidx.core:core-ktx:1.9.0' - - implementation "com.nimbusds:nimbus-jose-jwt:9.35" - //noinspection GradleDependency - implementation "androidx.security:security-crypto:1.0.0-rc03" - - // Reflection -// implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - - // Required -- JUnit 4 framework - testImplementation 'junit:junit:4.13.2' - // Optional -- Robolectric environment - testImplementation 'androidx.test:core:1.5.0' - testImplementation 'org.robolectric:robolectric:4.10' - // Optional -- Mockito framework - def mockito_version = "4.0.0" - testImplementation "org.mockito:mockito-core:$mockito_version" - testImplementation "org.mockito:mockito-inline:$mockito_version" - // Required -- JSON framework - testImplementation 'org.json:json:20201115' - // jsonassert - testImplementation 'org.skyscreamer:jsonassert:1.5.1' - - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 43d2c2ae..44460111 100644 --- a/build.gradle +++ b/build.gradle @@ -35,8 +35,4 @@ allprojects { task clean(type: Delete) { delete rootProject.buildDir -} - -// Create custom tasks for publishing -task publishRelease(dependsOn: ['publishReleasePublicationToSonatypeRepository']) -task publishRc(dependsOn: ['publishRcPublicationToSonatypeRepository']) \ No newline at end of file +} \ No newline at end of file diff --git a/publish-core.gradle b/publish-core.gradle index 4f7c1183..adafc33f 100644 --- a/publish-core.gradle +++ b/publish-core.gradle @@ -21,12 +21,12 @@ ext { signingPrivateKey = System.getenv("ANDROID_NEXUS_PRIVATE_KEY") ?: properties["signingPrivateKey"] } -println("signingKeyId: ${signingKeyId}") -println("signingPassword: ${signingPassword}") -println("ossrhUsername: ${ossrhUsername}") -println("ossrhPassword: ${ossrhPassword}") -println("sonatypeStagingProfileId: ${sonatypeStagingProfileId}") -println("signingPrivateKey: ${signingPrivateKey}") +// println("signingKeyId: ${signingKeyId}") +// println("signingPassword: ${signingPassword}") +// println("ossrhUsername: ${ossrhUsername}") +// println("ossrhPassword: ${ossrhPassword}") +// println("sonatypeStagingProfileId: ${sonatypeStagingProfileId}") +// println("signingPrivateKey: ${signingPrivateKey}") nexusPublishing { repositories {