diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 0000000..1322c17 --- /dev/null +++ b/.github/workflows/build_test.yml @@ -0,0 +1,56 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + # Build will compile APK, test APK and run tests, lint, etc. + build: + + runs-on: ubuntu-latest + timeout-minutes: 45 + env: + TERM: dumb + + steps: + - uses: actions/checkout@v2 + + - name: set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + # Skipping app:lintDebug as the the code's starting state contains lint errors that are + # corrected when implementing the codelab. + - name: Build and check + working-directory: constraint-layout-start + run: ./gradlew assembleDebug assembleDebugAndroidTest testDebug + + - name: Upload build reports + if: always() + uses: actions/upload-artifact@v1 + with: + name: build-reports + path: constraint-layout-start/app/build/reports + + - name: Copy test results + working-directory: constraint-layout-start + if: always() + run: | + mkdir -p junit + find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} junit/ \; + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v1 + with: + name: junit-results + path: constraint-layout-start/junit diff --git a/constraint-layout-start/app/build.gradle b/constraint-layout-start/app/build.gradle index 8ebca8c..0c547f2 100644 --- a/constraint-layout-start/app/build.gradle +++ b/constraint-layout-start/app/build.gradle @@ -1,12 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 32 defaultConfig { applicationId "com.google.googleio" minSdkVersion 22 - targetSdkVersion 25 + targetSdkVersion 32 versionCode 1 versionName "1.0" } @@ -19,7 +18,8 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' - compile 'com.android.support.constraint:constraint-layout:1.1.0-beta1' + implementation fileTree(dir: 'libs', include: ['*.jar']) + testImplementation 'junit:junit:4.13.2' + + implementation 'com.android.support.constraint:constraint-layout:2.0.4' } diff --git a/constraint-layout-start/app/src/androidTest/java/com/google/googleio/ApplicationTest.java b/constraint-layout-start/app/src/androidTest/java/com/google/googleio/ApplicationTest.java deleted file mode 100644 index 55284da..0000000 --- a/constraint-layout-start/app/src/androidTest/java/com/google/googleio/ApplicationTest.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2016 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package com.google.googleio; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/constraint-layout-start/app/src/main/AndroidManifest.xml b/constraint-layout-start/app/src/main/AndroidManifest.xml index 50ef845..2c99a83 100644 --- a/constraint-layout-start/app/src/main/AndroidManifest.xml +++ b/constraint-layout-start/app/src/main/AndroidManifest.xml @@ -25,7 +25,8 @@ android:supportsRtl="true" android:theme="@style/AppTheme" tools:ignore="AllowBackup,GoogleAppIndexingWarning"> - + diff --git a/constraint-layout-start/app/src/main/res/drawable/info_background.xml b/constraint-layout-start/app/src/main/res/drawable/info_background.xml index 8706792..7b734c5 100755 --- a/constraint-layout-start/app/src/main/res/drawable/info_background.xml +++ b/constraint-layout-start/app/src/main/res/drawable/info_background.xml @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/constraint-layout-start/app/src/main/res/layout/activity_main_barriers.xml b/constraint-layout-start/app/src/main/res/layout/activity_main_barriers.xml index 74ccd6c..8bd98d4 100644 --- a/constraint-layout-start/app/src/main/res/layout/activity_main_barriers.xml +++ b/constraint-layout-start/app/src/main/res/layout/activity_main_barriers.xml @@ -39,12 +39,14 @@ Kamera Leica M Typ 240 Singapur + Stern fabelhaft \ No newline at end of file diff --git a/constraint-layout-start/app/src/main/res/values/strings.xml b/constraint-layout-start/app/src/main/res/values/strings.xml index feeda76..cda850d 100644 --- a/constraint-layout-start/app/src/main/res/values/strings.xml +++ b/constraint-layout-start/app/src/main/res/values/strings.xml @@ -17,7 +17,8 @@ Layout Codelab Singapore officially the Republic of Singapore, and often referred to as the Lion City, the Garden City, and the Red Dot, is a global city in Southeast Asia and the world\'s only island city-state. It lies one degree (137 km) north of the equator, at the southernmost tip of continental Asia and peninsular Malaysia, with Indonesia\'s Riau Islands to the south. Singapore\'s territory consists of the diamond-shaped main island and 62 islets. - Placeholders + Placeholder + Star FAB Discard Upload ƒ/4 16s ISO 200 diff --git a/constraint-layout-start/build.gradle b/constraint-layout-start/build.gradle index 7dfba33..0ddc48e 100644 --- a/constraint-layout-start/build.gradle +++ b/constraint-layout-start/build.gradle @@ -2,10 +2,11 @@ buildscript { repositories { - jcenter() - } + google() + mavenCentral() + } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.android.tools.build:gradle:7.1.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -14,12 +15,10 @@ buildscript { allprojects { repositories { - jcenter() - maven { - url 'https://maven.google.com' + google() + mavenCentral() } } -} task clean(type: Delete) { delete rootProject.buildDir diff --git a/constraint-layout-start/gradle.properties b/constraint-layout-start/gradle.properties index 1d3591c..f1c49f3 100644 --- a/constraint-layout-start/gradle.properties +++ b/constraint-layout-start/gradle.properties @@ -9,8 +9,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/constraint-layout-start/gradle/wrapper/gradle-wrapper.properties b/constraint-layout-start/gradle/wrapper/gradle-wrapper.properties index 1b50332..23cdd3c 100644 --- a/constraint-layout-start/gradle/wrapper/gradle-wrapper.properties +++ b/constraint-layout-start/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Aug 03 10:22:23 PDT 2017 +#Tue Mar 24 15:28:00 PDT 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip