diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bdfb2b4..fa56912 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,19 +22,21 @@ jobs: uses: actions/checkout@v3 with: submodules: 'recursive' - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'zulu' - java-version: '11' + distribution: 'temurin' + java-version: '17' cache: 'gradle' - - name: Gradle cache - uses: actions/cache@v3 + - name: Cache Gradle Build + uses: actions/cache@v2 with: path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} + ~/.gradle/caches/build-cache-* + ~/.gradle/buildOutputCleanup/cache.properties + key: gradle-builds-core-${{ github.sha }} + restore-keys: | + gradle-builds-${{ runner.os }} - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -66,20 +68,21 @@ jobs: uses: actions/checkout@v3 with: submodules: 'recursive' - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'zulu' - java-version: '11' + distribution: 'temurin' + java-version: '17' cache: 'gradle' - - name: Gradle cache - uses: actions/cache@v3 + - name: Cache Gradle Build + uses: actions/cache@v2 with: path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} - restore-keys: gradle-${{ runner.os }}- + ~/.gradle/caches/build-cache-* + ~/.gradle/buildOutputCleanup/cache.properties + key: gradle-builds-core-${{ github.sha }} + restore-keys: | + gradle-builds-${{ runner.os }} - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -157,20 +160,21 @@ jobs: uses: actions/checkout@v3 with: submodules: 'recursive' - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'zulu' - java-version: '11' + distribution: 'temurin' + java-version: '17' cache: 'gradle' - - name: Gradle cache - uses: actions/cache@v3 + - name: Cache Gradle Build + uses: actions/cache@v2 with: path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} - restore-keys: gradle-${{ runner.os }}- + ~/.gradle/caches/build-cache-* + ~/.gradle/buildOutputCleanup/cache.properties + key: gradle-builds-core-${{ github.sha }} + restore-keys: | + gradle-builds-${{ runner.os }} - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: diff --git a/lsplant/src/main/jni/art/mirror/class.hpp b/lsplant/src/main/jni/art/mirror/class.hpp index 846e2d5..9e832c3 100644 --- a/lsplant/src/main/jni/art/mirror/class.hpp +++ b/lsplant/src/main/jni/art/mirror/class.hpp @@ -112,8 +112,10 @@ public: } int sdk_int = GetAndroidApiLevel(); - if (sdk_int >= __ANDROID_API_P__) { + if (sdk_int >= __ANDROID_API_R__) { initialized_status = 15; + } else if (sdk_int >= __ANDROID_API_P__) { + initialized_status = 14; } else if (sdk_int == __ANDROID_API_O_MR1__) { initialized_status = 11; } else { @@ -158,7 +160,7 @@ public: it++; } } - } else if (!class_def && self) { + } else if (self) { std::unique_lock lk(backup_methods_lock_); if (auto found = backup_methods_.find(self); found != backup_methods_.end()) { for (auto it = found->second.begin(); it != found->second.end();) {