This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gradle-plugin): do not apply gradle plugin to projects without bu…
…ildscript (fixes #1491)
- Loading branch information
Showing
8 changed files
with
122 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
gradle-plugin/src/test/resources/sample-project/nested/app/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
build.gradle.kts |
62 changes: 62 additions & 0 deletions
62
gradle-plugin/src/test/resources/sample-project/nested/app/build.gradle.kts.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
plugins { | ||
id("com.android.application") | ||
@@PLUGINS@@ | ||
} | ||
|
||
android { | ||
namespace = "com.example.myapplication2" | ||
compileSdk = 33 | ||
buildToolsVersion = "33.0.2" | ||
|
||
defaultConfig { | ||
applicationId = "com.example.myapplication2" | ||
minSdk = 21 | ||
targetSdk = 33 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
vectorDrawables { | ||
useSupportLibrary = true | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = true | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
|
||
buildFeatures { | ||
viewBinding = true | ||
|
||
} | ||
|
||
// LogSender must be applied to all the debuggable product flavors | ||
flavorDimensions += "version" | ||
productFlavors { | ||
create("demo") { | ||
dimension = "version" | ||
applicationIdSuffix = ".demo" | ||
versionNameSuffix = "-demo" | ||
} | ||
|
||
create("full") { | ||
dimension = "version" | ||
applicationIdSuffix = ".full" | ||
versionNameSuffix = "-full" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") | ||
implementation("com.google.android.material:material:1.9.0") | ||
} |
21 changes: 21 additions & 0 deletions
21
gradle-plugin/src/test/resources/sample-project/nested/app/proguard-rules.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
5 changes: 5 additions & 0 deletions
5
gradle-plugin/src/test/resources/sample-project/nested/app/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<application android:label="@string/app_name"/> | ||
</manifest> |
20 changes: 20 additions & 0 deletions
20
gradle-plugin/src/test/resources/sample-project/nested/app/src/main/res/values/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- | ||
~ This file is part of AndroidIDE. | ||
~ | ||
~ AndroidIDE is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation, either version 3 of the License, or | ||
~ (at your option) any later version. | ||
~ | ||
~ AndroidIDE is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>. | ||
--> | ||
|
||
<resources> | ||
<string name="app_name">Sample app</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters