<commit_before># Spring for Android

[Spring for Android] is a framework that is designed to provide components of the [Spring Framework] family of projects for use in native [Android] applications.


## Download Artifacts

Spring for Android consists of three modules: Core, Rest Template, and Auth.

The new [Android Build System] provides a Gradle plugin for building Android apps, and [Gradle] itself supports external dependency resolution via Maven repositories. Additionally, the [Android Maven Plugin] makes it possible to build Android applications utilizing the power of [Maven] dependency management. See [downloading Spring artifacts] for [Maven] repository information. 

> **Note:** You do not need to include all three repositories, rather select the one that corresponds to the release type of the dependency. GA releases are also available through Maven Central.

### Gradle

```groovy
dependencies {
    compile("org.springframework.android:spring-android-core:${springAndroidVersion}")
    compile("org.springframework.android:spring-android-rest-template:${springAndroidVersion}")
    compile("org.springframework.android:spring-android-auth:${springAndroidVersion}")
}
repositories {
    maven { url "http://repo.spring.io/release" }
    maven { url "http://repo.spring.io/milestone" }
    maven { url "http://repo.spring.io/snapshot" }
}
```

### Maven

```xml
<dependencies>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-core</artifactId>
        <version>${org.springframework.android-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-rest-template</artifactId>
        <version>${org.springframework.android-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-auth</artifactId>
        <version>${org.springframework.android-version}</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>spring-repo</id>
        <name>Spring Repository</name>
        <url>http://repo.spring.io/release</url>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/milestone</url>
    </repository>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>http://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
```


## Documentation

See the current [Javadoc] and [reference docs].

<commit_msg>Update README with example build configuration<commit_after># Spring for Android

[Spring for Android] is a framework that is designed to provide components of the [Spring Framework] family of projects for use in native [Android] applications.


## Download Artifacts

Spring for Android consists of three modules: Core, Rest Template, and Auth.

The new [Android Build System] provides a Gradle plugin for building Android apps, and [Gradle] itself supports external dependency resolution via Maven repositories. Additionally, the [Android Maven Plugin] makes it possible to build Android applications utilizing the power of [Maven] dependency management. See [downloading Spring artifacts] for [Maven] repository information. 

> **Note:** You do not need to include all three repositories, rather select the one that corresponds to the release type of the dependency. GA releases are also available through Maven Central.

### Gradle

```groovy
dependencies {
    compile("org.springframework.android:spring-android-core:${springAndroidVersion}")
    compile("org.springframework.android:spring-android-rest-template:${springAndroidVersion}")
    compile("org.springframework.android:spring-android-auth:${springAndroidVersion}")
}
repositories {
    maven { url "http://repo.spring.io/release" }
    maven { url "http://repo.spring.io/milestone" }
    maven { url "http://repo.spring.io/snapshot" }
}
```

### Maven

```xml
<dependencies>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-core</artifactId>
        <version>${org.springframework.android-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-rest-template</artifactId>
        <version>${org.springframework.android-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-auth</artifactId>
        <version>${org.springframework.android-version}</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>spring-repo</id>
        <name>Spring Repository</name>
        <url>http://repo.spring.io/release</url>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/milestone</url>
    </repository>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>http://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
```


### Example Build Configuration

The following is an example `build.gradle` that illustrates how to include the `spring-android-rest-template` module along with the `jackson-databind` library for marshaling JSON data. Note the `packagingOptions` section which filters specific files that can cause APK packaging to fail.

```groovy
apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion '20.0.0'

    defaultConfig {
        applicationId 'org.springframework.demo'
        minSdkVersion 15
        targetSdkVersion 20
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:20.+'
    compile 'org.springframework.android:spring-android-rest-template:2.0.0.BUILD-SNAPSHOT'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.4.1.3'
}

```

## Documentation

See the current [Javadoc] and [reference docs].


{'fraction_non_alphanumeric': 0.11855364552459988, 'fraction_numerical': 0.003704801422643746, 'mean_word_length': 3.5601351351351354, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 0, '>': 117, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4750655', 'n_tokens_mistral': 1935, 'n_tokens_neox': 1807, 'n_words': 476}