Skip to content

[libaddressinput] add missing dependencies to gradle build files and update to Gradle 8.2.2 #240

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ java/**/build/
android/build/
build/
common/build/
.idea/
local.properties
16 changes: 8 additions & 8 deletions android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Android Studio: https://developer.android.com/sdk/index.html (recommended)
- Check Tools > SDK Manager.

Android SDK Tools: https://developer.android.com/sdk/index.html#Other
- Set the ANDROID_HOME environment variable to the root of the SDK.
- Set the ANDROID_HOME environment variable to the root of the SDK.

Ensure the following packages are installed:
- Tools/Android SDK Platform-tools (Rev. 35.0.1)
Expand Down Expand Up @@ -53,19 +53,19 @@ The test runner logs to the system log, which can be viewed using logcat:

4. Copy the widget and the common libraries:

`cp android/build/outputs/aar/android-release.aar path/to/project/app/libs/`
`cp android/build/outputs/aar/android-release.aar path/to/project/app/libs/`

`cp common/build/libs/common.jar path/to/project/app/libs/`
`cp common/build/libs/common.jar path/to/project/app/libs/`

Note: Be sure top replace 'path/to/project' with the name of your project.
Note: Be sure top replace 'path/to/project' with the name of your project.

5. Import both modules into your app.

Note: If you use Android Studio, check out the [user guide](https://developer.android.com/studio/projects/android-library.html#AddDependency) and follow the instructions under 'Add your library as a dependency'. Be sure to add *both* modules as dependencies of the app.
Note: If you use Android Studio, check out the [user guide](https://developer.android.com/studio/projects/android-library.html#AddDependency) and follow the instructions under 'Add your library as a dependency'. Be sure to add *both* modules as dependencies of the app.

6. Add the widget to your app. Note: This Assumes a default empty project configuration:

i. In activity_main.xml add:
i. In activity_main.xml add:

```xml
<LinearLayout
Expand All @@ -75,7 +75,7 @@ The test runner logs to the system log, which can be viewed using logcat:
android:orientation="vertical"/>
```

ii. In MainActivity.java add the following import statements:
ii. In MainActivity.java add the following import statements:

```java
import android.view.ViewGroup;
Expand Down Expand Up @@ -128,4 +128,4 @@ public class MainActivity extends AppCompatActivity {
this.addressWidget = new AddressWidget(this, viewGroup, defaultFormOptions, cacheManager);
}
}
```
```
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ allprojects {
mavenLocal()
google()
}
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ if [ -n "$JAVA_HOME" ] ; then
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
Expand All @@ -132,6 +133,7 @@ else
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
Expand Down