Skip to content

Commit

Permalink
Support API levels 32 and 33
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolberg authored Oct 11, 2022
1 parent 237e7d3 commit cbc2dd1
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 1 deletion.
19 changes: 19 additions & 0 deletions api/32/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2021. Toast 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.
*/

buildSignatures(
apiLevel = name,
sdk = "platform-32:r01"
)
12 changes: 12 additions & 0 deletions api/32/src/test/java/com/toasttab/android/Api32DexTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.toasttab.android

import com.google.common.truth.Truth.assertThat
import com.toasttab.android.test.D8Runner
import org.junit.Test

class Api32DexTest {
@Test
fun `API31 desugaring should succeed`() {

This comment has been minimized.

Copy link
@sebastianharder

sebastianharder Dec 21, 2022

Should be API32, no?

assertThat(D8Runner.run(apiLevel = 32).warnings).isEmpty()
}
}
19 changes: 19 additions & 0 deletions api/33/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2021. Toast 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.
*/

buildSignatures(
apiLevel = name,
sdk = "platform-33:r02"
)
12 changes: 12 additions & 0 deletions api/33/src/test/java/com/toasttab/android/Api33DexTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.toasttab.android

import com.google.common.truth.Truth.assertThat
import com.toasttab.android.test.D8Runner
import org.junit.Test

class Api33DexTest {
@Test
fun `API33 desugaring should succeed`() {
assertThat(D8Runner.run(apiLevel = 33).warnings).isEmpty()
}
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ include(
"test:basic-sugar-treadmill"
)

(19..31).forEach {
(19..33).forEach {
include("api:$it")
}

0 comments on commit cbc2dd1

Please sign in to comment.