Skip to content

Commit

Permalink
Inline resources
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Feb 10, 2023
1 parent 9ec9131 commit c178429
Showing 1 changed file with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package net.twisterrob.gradle.android

import net.twisterrob.gradle.BaseIntgTest
import net.twisterrob.gradle.test.GradleBuildTestResources
import net.twisterrob.gradle.test.GradleBuildTestResources.basedOn
import net.twisterrob.gradle.test.GradleRunnerRule
import net.twisterrob.gradle.test.GradleRunnerRuleExtension
import net.twisterrob.gradle.test.assertSuccess
Expand All @@ -16,7 +14,34 @@ class AndroidSigningPluginIntgTest : BaseIntgTest() {
override lateinit var gradle: GradleRunnerRule

@Test fun `logs error when keystore not valid (release)`() {
gradle.basedOn(GradleBuildTestResources.android)
@Language("gradle")
val build = """
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:@net.twisterrob.test.android.pluginVersion@'
}
}
repositories {
google() // for aapt2 internal binary
mavenCentral()
}
// Need to delay configuration of android extension to the point where the plugin is applied.
// This is because it's not possible to apply the `com.android.application` plugin in advance.
// Each test will apply it if and when necessary through net.twisterrob.android-* plugins.
project.plugins.withType(com.android.build.gradle.internal.plugins.BasePlugin).configureEach {
android {
compileSdkVersion '@net.twisterrob.test.android.compileSdkVersion@'
}
}
""".trimIndent()
gradle.file(build, "build.gradle")
gradle.file("<manifest package=\"net.twisterrob.gradle.test_app\" />", "src", "main", "AndroidManifest.xml")

@Language("java")
val apkContentForProguard = """
Expand Down

0 comments on commit c178429

Please sign in to comment.