Skip to content
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

TOOL-317 #55

Merged
merged 2 commits into from
Jul 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions androidcomponents/androidcomponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ func Ensure(androidSdk *sdk.Model, gradlewPath string) error {

func (i installer) getDependencyCases() map[string]func(match string) error {
return map[string]func(match string) error{
`(Observed package id 'ndk-bundle' in inconsistent location)`: i.ndkInconsistentLocation,
`(NDK not configured)`: i.ndkNotConfigured,
`(Observed package id 'ndk-bundle' in inconsistent location)`: i.ndkInconsistentLocation,
`(NDK not configured)`: i.ndkNotConfigured,
`failed to find target with hash string 'android-(.*)'\s*`: i.target,
`failed to find Build Tools revision ([0-9.]*)\s*`: i.buildTool,
`Could not find (com\.android\.support\..*)\.`: i.extrasLib,
`Could not find any version that matches (com\.android\.support.*)\.`: i.extrasLib,
`Could not find (com\.android\.support:.*)\.`: i.extrasLib,
`Could not find any version that matches (com\.android\.support:*)\.`: i.extrasLib,
}
}

Expand Down
44 changes: 43 additions & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ workflows:
- test_android-sdk22-subdir
- test_react_native
- test_ndk_install

- test_support_library

test_ndk:
envs:
Expand Down Expand Up @@ -240,6 +240,48 @@ workflows:
- path::./:
title: Step test

test_support_library:
envs:
- SAMPLE_APP_URL: https://github.com/godrei/JetPackTest.git
Copy link
Contributor

@koral-- koral-- Jul 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Samples should be located in bitrise-io organization.
BTW all other sample URLs in this file point to bitrise-samples org which is deprecated and contains no repos now (there are redirects to bitrise-io).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

- BRANCH: master
- GRADLE_BUILD_FILE_PATH: build.gradle
- GRADLEW_PATH: ./gradlew
steps:
- script:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
rm -rf ./_tmp
- script:
inputs:
- content: |-
#!/usr/bin/env bash
sdkmanager --uninstall "extras;android;m2repository"
- change-workdir:
title: Switch working dir to test / _tmp dir
run_if: true
inputs:
- path: ./_tmp
- is_create_path: true
- script:
inputs:
- content: |-
#!/usr/bin/env bash
if [[ -z "${SAMPLE_APP_URL}" ]]; then
echo "error: there is no SAMPLE_APP_URL env var specified"
exit 1
elif [[ -z "${COMMIT}" && -z "${BRANCH}" ]]; then
echo "error: can't checkout: there is no BRANCH or COMMIT env var specified"
exit 1
fi
git init
git remote add origin "${SAMPLE_APP_URL}"
git fetch || exit 1
[[ -n "${COMMIT}" ]] && git checkout "${COMMIT}" || git checkout "${BRANCH}"
- path::./:
title: Step test

test_old_gradle:
envs:
- SAMPLE_APP_URL: https://github.com/bitrise-samples/2048-android.git
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func updateNDK(revision string) error {
return err
}

if err := updateNDKPathIfNeeded(ndkHome); err != nil {
if err := ensureNDKPath(ndkHome); err != nil {
return err
}

Expand All @@ -159,7 +159,7 @@ func updateNDK(revision string) error {
return nil
}

func updateNDKPathIfNeeded(ndkHome string) error {
func ensureNDKPath(ndkHome string) error {
log.Printf("searching for platforms dir in %s", ndkHome)
var foundPDPath string
if err := filepath.Walk(ndkHome, func(currentPath string, info os.FileInfo, err error) error {
Expand Down