-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gradle] Support new AGP with androidLibrary target
- Loading branch information
Showing
20 changed files
with
299 additions
and
54 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
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
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
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
37 changes: 37 additions & 0 deletions
37
...le-plugins/compose/src/test/test-projects/misc/newAgpResources/appModule/build.gradle.kts
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,37 @@ | ||
plugins { | ||
id("org.jetbrains.compose") | ||
kotlin("multiplatform") | ||
kotlin("plugin.compose") | ||
id("com.android.application") | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(11) | ||
androidTarget() | ||
jvm() | ||
|
||
sourceSets { | ||
commonMain.dependencies { | ||
implementation(compose.runtime) | ||
implementation(compose.material3) | ||
implementation(compose.components.resources) | ||
implementation(project(":featureModule")) | ||
} | ||
|
||
jvmMain.dependencies { | ||
implementation(compose.desktop.currentOs) | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "me.sample.app" | ||
compileSdk = 35 | ||
defaultConfig { | ||
applicationId = "org.example.project" | ||
minSdk = 24 | ||
targetSdk = 35 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...src/test/test-projects/misc/newAgpResources/appModule/src/androidMain/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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest> | ||
<application/> | ||
</manifest> |
3 changes: 3 additions & 0 deletions
3
...rojects/misc/newAgpResources/appModule/src/commonMain/composeResources/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,3 @@ | ||
<resources> | ||
<string name="str_1">App text str_1</string> | ||
</resources> |
17 changes: 17 additions & 0 deletions
17
...t/test-projects/misc/newAgpResources/appModule/src/commonMain/kotlin/me/sample/app/App.kt
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,17 @@ | ||
package me.sample.app | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import newagpresources.appmodule.generated.resources.* | ||
import org.jetbrains.compose.resources.stringResource | ||
|
||
@Composable | ||
fun App() { | ||
Column { | ||
val txt = "text: " | ||
Text(txt + stringResource(Res.string.str_1)) | ||
MyFeatureText(txt = txt) | ||
} | ||
} |
Oops, something went wrong.