From 524eeba938accda257b9c163f0e4c409199edb2a Mon Sep 17 00:00:00 2001 From: alex-crowe <71283686+alex-crowe@users.noreply.github.com> Date: Tue, 20 Jul 2021 15:55:52 -0400 Subject: [PATCH] Release 3.7.5 --- app/build.gradle | 4 ++-- fatAar.gradle | 21 +++++++++++++++++++++ nexusPublishing.gradle | 19 +++++++++++++++++++ scripts/build.sh | 4 ---- scripts/test.sh | 4 ---- unity-ads/build.gradle | 12 ++++++------ unity-scaradapter-1920/build.gradle | 20 +------------------- unity-scaradapter-1950/build.gradle | 19 +------------------ unity-scaradapter-2000/build.gradle | 19 +------------------ unity-scaradapter-common/build.gradle | 19 +------------------ 10 files changed, 52 insertions(+), 89 deletions(-) create mode 100644 fatAar.gradle create mode 100644 nexusPublishing.gradle delete mode 100755 scripts/build.sh delete mode 100755 scripts/test.sh diff --git a/app/build.gradle b/app/build.gradle index c046dc01..af69ed60 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.unity3d.ads.example" minSdkVersion 19 targetSdkVersion 30 - versionCode = 3740 - versionName = "3.7.4" + versionCode = 3750 + versionName = "3.7.5" } flavorDimensions "arEnabled" diff --git a/fatAar.gradle b/fatAar.gradle new file mode 100644 index 00000000..6f567dba --- /dev/null +++ b/fatAar.gradle @@ -0,0 +1,21 @@ +task deleteOldJar(type: Delete) { + delete("../unity-ads/libs/${project.name}.jar") +} + +def copyJarTask(buildType) { + return tasks.create("copyJars${buildType}", Copy.class) { + from("build/intermediates/compile_library_classes_jar/${buildType}/") + into('../unity-ads/libs/') + include('classes.jar') + rename('classes.jar', "${project.name}.jar") + }.dependsOn(deleteOldJar) +} + +project.tasks.whenTaskAdded { Task theTask -> + if (theTask.name == 'bundleLibCompileToJarRelease') { + theTask.finalizedBy(copyJarTask("release")) + } + if (theTask.name == 'bundleLibCompileToJarDebug') { + theTask.finalizedBy(copyJarTask("debug")) + } +} \ No newline at end of file diff --git a/nexusPublishing.gradle b/nexusPublishing.gradle new file mode 100644 index 00000000..7e0e121e --- /dev/null +++ b/nexusPublishing.gradle @@ -0,0 +1,19 @@ +apply plugin: 'io.github.gradle-nexus.publish-plugin' + +Properties properties = new Properties() +if (project.rootProject.file('local.properties').exists()) { + properties.load(project.rootProject.file('local.properties').newDataInputStream()) +} + +nexusPublishing { + repositories { + sonatype { + stagingProfileId = properties.getProperty("NEXUS_PROFILE_ID") + username = properties.getProperty("NEXUS_USERNAME") + password = properties.getProperty("NEXUS_PASSWORD") + // Add these lines if using new Sonatype infra + nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) + snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) + } + } +} \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100755 index 6ab86043..00000000 --- a/scripts/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -set -x - -echo "Building is done in downstream jobs!" diff --git a/scripts/test.sh b/scripts/test.sh deleted file mode 100755 index 3e03e9b2..00000000 --- a/scripts/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -set -x - -echo "Testing is done in downstream jobs!" diff --git a/unity-ads/build.gradle b/unity-ads/build.gradle index 54e3ee3d..c735b49a 100644 --- a/unity-ads/build.gradle +++ b/unity-ads/build.gradle @@ -19,8 +19,8 @@ dependencies { ext { GROUP_ID = "com.unity3d.ads" ARTIFACT_ID = "unity-ads" - VERSION_ID = "3.7.4" - VERSION_CODE = 3740 + VERSION_ID = "3.7.5" + VERSION_CODE = 3750 SIGN_AAR = properties.getProperty("SIGN_AAR") ?: false } @@ -74,10 +74,10 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation project(':unity-scaradapter-2000') - androidTestImplementation project(':unity-scaradapter-1950') - androidTestImplementation project(':unity-scaradapter-1920') - androidTestImplementation project(':unity-scaradapter-common') + androidTestCompileOnly project(':unity-scaradapter-2000') + androidTestCompileOnly project(':unity-scaradapter-1950') + androidTestCompileOnly project(':unity-scaradapter-1920') + androidTestCompileOnly project(':unity-scaradapter-common') androidTestImplementation 'org.mockito:mockito-core:2.28.2' androidTestImplementation 'org.mockito:mockito-android:2.25.0' androidTestImplementation 'androidx.test:runner:1.3.0' diff --git a/unity-scaradapter-1920/build.gradle b/unity-scaradapter-1920/build.gradle index 86116304..27d1b6b3 100644 --- a/unity-scaradapter-1920/build.gradle +++ b/unity-scaradapter-1920/build.gradle @@ -42,22 +42,4 @@ dependencies { compileOnly 'com.google.android.gms:play-services-ads:19.2.0' } - -task deleteOldJar(type: Delete) { - delete("../unity-ads/libs/${project.name}.jar") -} - -task copyJars(type: Copy) { - from('build/intermediates/compile_library_classes_jar/release/') - into('../unity-ads/libs/') - include('classes.jar') - rename('classes.jar', "${project.name}.jar") -} - -copyJars.dependsOn(deleteOldJar) - -project.tasks.whenTaskAdded { Task theTask -> - if (theTask.name == 'bundleLibCompileToJarRelease') { - theTask.finalizedBy(copyJars) - } -} +apply from: '../fatAar.gradle' diff --git a/unity-scaradapter-1950/build.gradle b/unity-scaradapter-1950/build.gradle index 03c5ff1b..f71aa92d 100644 --- a/unity-scaradapter-1950/build.gradle +++ b/unity-scaradapter-1950/build.gradle @@ -42,21 +42,4 @@ dependencies { compileOnly 'com.google.android.gms:play-services-ads:19.5.0' } -task deleteOldJar(type: Delete) { - delete("../unity-ads/libs/${project.name}.jar") -} - -task copyJars(type: Copy) { - from('build/intermediates/compile_library_classes_jar/release/') - into('../unity-ads/libs/') - include('classes.jar') - rename('classes.jar', "${project.name}.jar") -} - -copyJars.dependsOn(deleteOldJar) - -project.tasks.whenTaskAdded { Task theTask -> - if (theTask.name == 'bundleLibCompileToJarRelease') { - theTask.finalizedBy(copyJars) - } -} \ No newline at end of file +apply from: '../fatAar.gradle' \ No newline at end of file diff --git a/unity-scaradapter-2000/build.gradle b/unity-scaradapter-2000/build.gradle index a1f69fe1..c2d9ea01 100644 --- a/unity-scaradapter-2000/build.gradle +++ b/unity-scaradapter-2000/build.gradle @@ -42,21 +42,4 @@ dependencies { compileOnly 'com.google.android.gms:play-services-ads:20.1.0' } -task deleteOldJar(type: Delete) { - delete("../unity-ads/libs/${project.name}.jar") -} - -task copyJars(type: Copy) { - from('build/intermediates/compile_library_classes_jar/release/') - into('../unity-ads/libs/') - include('classes.jar') - rename('classes.jar', "${project.name}.jar") -} - -copyJars.dependsOn(deleteOldJar) - -project.tasks.whenTaskAdded { Task theTask -> - if (theTask.name == 'bundleLibCompileToJarRelease') { - theTask.finalizedBy(copyJars) - } -} \ No newline at end of file +apply from: '../fatAar.gradle' \ No newline at end of file diff --git a/unity-scaradapter-common/build.gradle b/unity-scaradapter-common/build.gradle index 755099b2..03fdde73 100644 --- a/unity-scaradapter-common/build.gradle +++ b/unity-scaradapter-common/build.gradle @@ -36,21 +36,4 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' } -task deleteOldJar(type: Delete) { - delete("../unity-ads/libs/${project.name}.jar") -} - -task copyJars(type: Copy) { - from('build/intermediates/compile_library_classes_jar/release/') - into('../unity-ads/libs/') - include('classes.jar') - rename('classes.jar', "${project.name}.jar") -} - -copyJars.dependsOn(deleteOldJar) - -project.tasks.whenTaskAdded { Task theTask -> - if (theTask.name == 'bundleLibCompileToJarRelease') { - theTask.finalizedBy(copyJars) - } -} \ No newline at end of file +apply from: '../fatAar.gradle' \ No newline at end of file