Question: I'm creating a gradle plugin that uses gson, but when I use the plugin at my client it throws this `java.lang.NoClassDefFoundError: com/google/gson/Gson`
I expect I am linking my dependencies in the plugin in a wrong way, but i'm not quite sure so any help would be great.

The build.gradle in the plugin

```
group 'nl.daanluttik.gradle'
version '0.1'

apply plugin: 'java'
apply plugin: 'maven' // the plugin to distribute to maven

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'com.google.code.gson', name: 'gson', version: '1.7.2'
    compile gradleApi()/*The gradle plugin api*/
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

//To distribute to maven
uploadArchives {
    repositories {
        mavenLocal()
    }
}

```

A segment of the buildgradle in the client project

```
buildscript {
    repositories {
        mavenLocal()
    }
    dependencies {
        classpath group: 'nl.daanluttik.gradle', name: 'peach', version: '0.1'
    }
}

```

Answer: 
when you display owl carousel after ajax call you need to initialize it after receiving the response so try putting the carousel inside the function

```
  function init_carousel() {
     $('.owl-carousel').owlCarousel();
  }; 

```

and call the function when the ajax response is successfull to refresh the carousel. And also for it to initialize on page load jus call the function in:

```
jQuery(document).ready(function() {
   init_carousel();
});

```
In addition to the above answer, try using owlCarousel properties to control the behaviour as:

```
$('.searchPageGallery').owlCarousel({
        margin:0,
        nav:true,
        loop:true,
        stagePadding:0,
        center:true,
        dots:false,
        lazyLoad:true,
        items:1,
        responsiveClass:true,
        responsive:{
            0:{
                items:1,
                nav:true,
                dots:false
            },
            1025:{
                items:1,
                nav:true,
                dots:false
            },
            1200:{
                items:1,
                nav:true,
                nav:true
            }
        }
    });

```