-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes:#3868 Added Android Bundle Support #3935
Merged
lihaoyi
merged 12 commits into
com-lihaoyi:main
from
himanshumahajan138:issue-3868-final
Nov 13, 2024
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
88c8dce
Fixes:#3868 First Test Phase
himanshumahajan138 069e401
Lint Fixture
himanshumahajan138 070c71f
Java Lint Fixture
himanshumahajan138 eef4520
Merge branch 'main' into issue-3868-final
himanshumahajan138 5a04a97
Merge branch 'main' into issue-3868-final
himanshumahajan138 b6ac901
Reviews Resolved
himanshumahajan138 be20e8e
Merge branch 'main' into issue-3868-final
himanshumahajan138 e9d66a2
Reviews Resolved: Fixture
himanshumahajan138 21fc638
Documentation Updated: Final Fixture
himanshumahajan138 3d41d7e
Reviews Fixture
himanshumahajan138 4d35348
Added SDK TOOLS DOCUMENTATION LINK
himanshumahajan138 ffd6dd5
Merge branch 'main' into issue-3868-final
himanshumahajan138 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
example/javalib/android/1-hello-world/app/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
4 changes: 4 additions & 0 deletions
4
example/javalib/android/1-hello-world/app/resources/values/colors.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 @@ | ||
<resources> | ||
<color name="white">#FFFFFF</color> | ||
<color name="text_green">#34A853</color> | ||
</resources> |
4 changes: 4 additions & 0 deletions
4
example/javalib/android/1-hello-world/app/resources/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,4 @@ | ||
<resources> | ||
<string name="app_name">HelloWorldApp</string> | ||
<string name="hello_world">Hello, World Java!</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
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,24 @@ | ||
package build | ||
|
||
import mill._ | ||
import kotlinlib._ | ||
import coursier.maven.MavenRepository | ||
import mill.javalib.android.{AndroidSdkModule, AndroidAppBundle} | ||
|
||
object androidSdkModule0 extends AndroidSdkModule { | ||
def buildToolsVersion = "35.0.0" | ||
} | ||
|
||
object bundle extends AndroidAppBundle { | ||
def androidSdkModule = mill.define.ModuleRef(androidSdkModule0) | ||
} | ||
|
||
/** Usage | ||
|
||
> ./mill show bundle.androidBundle | ||
".../out/bundle/androidBundle.dest/bundle.aab" | ||
|
||
> ./mill show bundle.androidApk | ||
".../out/bundle/androidApk.dest/universal.apk" | ||
|
||
*/ |
12 changes: 12 additions & 0 deletions
12
example/javalib/android/2-app-bundle/bundle/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,12 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.helloworld.app" android:versionCode="1" android:versionName="1.0"> | ||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="35"/> | ||
<application android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar" android:debuggable="true"> | ||
<activity android:name=".MainActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
4 changes: 4 additions & 0 deletions
4
example/javalib/android/2-app-bundle/bundle/resources/values/colors.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 @@ | ||
<resources> | ||
<color name="white">#FFFFFF</color> | ||
<color name="text_green">#34A853</color> | ||
</resources> |
4 changes: 4 additions & 0 deletions
4
example/javalib/android/2-app-bundle/bundle/resources/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,4 @@ | ||
<resources> | ||
<string name="app_name">HelloWorldBundleApp</string> | ||
<string name="hello_world">Hello, World Bundle!</string> | ||
</resources> |
39 changes: 39 additions & 0 deletions
39
...le/javalib/android/2-app-bundle/bundle/src/main/java/com/helloworld/app/MainActivity.java
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,39 @@ | ||
package com.helloworld.app; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.view.Gravity; | ||
import android.view.ViewGroup.LayoutParams; | ||
import android.widget.TextView; | ||
|
||
public class MainActivity extends Activity { | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
// Create a new TextView | ||
TextView textView = new TextView(this); | ||
|
||
// Set the text to the string resource | ||
textView.setText(getString(R.string.hello_world)); | ||
|
||
// Set text size | ||
textView.setTextSize(32); | ||
|
||
// Center the text within the view | ||
textView.setGravity(Gravity.CENTER); | ||
|
||
// Set the layout parameters (width and height) | ||
textView.setLayoutParams( | ||
new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); | ||
|
||
// Set the text color using a resource | ||
textView.setTextColor(getResources().getColor(R.color.text_green)); | ||
|
||
// Set the background color using a resource | ||
textView.setBackgroundColor(getResources().getColor(R.color.white)); | ||
|
||
// Set the content view to display the TextView | ||
setContentView(textView); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
example/kotlinlib/android/1-hello-world/app/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
4 changes: 4 additions & 0 deletions
4
example/kotlinlib/android/1-hello-world/app/resources/values/colors.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 @@ | ||
<resources> | ||
<color name="white">#FFFFFF</color> | ||
<color name="text_green">#34A853</color> | ||
</resources> |
4 changes: 4 additions & 0 deletions
4
example/kotlinlib/android/1-hello-world/app/resources/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,4 @@ | ||
<resources> | ||
<string name="app_name">HelloWorldApp</string> | ||
<string name="hello_world">Hello, World Kotlin!</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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
// Using hex color code directly
mean?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂😂😂 actually these documentations are not updated i will update them with updation of build docs