GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Implementation

Implementation

Jump to bottom
Efra Espada edited this page Jun 23, 2021 · 28 revisions

Gradle support

Some Gradle 6.x versions don't work properly. Set v6.4.1 in your gradle-wrapper.properties:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip

Plugin setup

The plugin looks for string resources for obfuscating at compilation time. Works globally in the project.

In the project's root-level:

buildscript {

    ext.stringcare_version = '4.2.1'

    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath "io.github.stringcare:plugin:$stringcare_version"
        classpath 'com.android.tools.build:gradle:4.2.1'
    }
}

Library setup

The library reveals the obfuscated string resources generated by the plugin and obfuscates and reveals strings at runtime.

In app module:

apply plugin: 'com.android.application'
apply plugin: StringCare

// default config
stringcare {
    debug false
    assetsFiles = ["*.json"]
    stringFiles = ['strings.xml']
    srcFolders = ['src/main']
}

android {
    // any config

    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
} 

dependencies {
    implementation "io.github.stringcare:library:$stringcare_version"
}

The plugin must work with the same version of the library.

Setup in code

The library needs the global application's context:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SC.init(getApplicationContext());
}
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    SC.init { applicationContext }
}

License

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.

Home

Flutter Support

What Is StringCare

Implementation

Strings Usage

Assets Usage

Configuration

Publish APK

Limitations

Compatibility

Tasks

Resource Tips

Clone this wiki locally

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.